Le plug est bien évidemment paramétrable selon les besoin…
/* AMX Mod script.
*
* (c) Copyright 2002, OLO
* This file is provided as is (no warranties).
*
*/
#include <amxmod>
new bool:checkme[33]
new pos[33][3]
public checksniper(param[]){
new origin[3], id = param[0]
checkme[id] = true
get_user_origin(id,origin)
if ( get_distance(origin,pos[id]) < 300 ){
new wpnname[32], name[32]
new clip, ammo, wpnid = get_user_weapon(id,clip,ammo)
get_user_name(id,name,31)
get_weaponname(wpnid,wpnname,31)
set_hudmessage(200, 100, 0, 0.05, 0.55, 0, 6.0, 7.0, 0.5, 0.15, 1)
show_hudmessage(0,"Psss... Fais gaffe...^n%s campe avec un %s (%d/%d)",name,wpnname[7],clip,ammo)
}
}
public startchecking(id){
if ( checkme[id] ){
checkme[id] = false
new param[2]
param[0] = id
get_user_origin(id,pos[id])
set_task(8.0,"checksniper",id,param,1)
}
}
public removechecking(id){
checkme[id] = true
remove_task(id)
}
public client_connect(id){
checkme[id] = true
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("Camper Detector","0.1","default")
register_event("SetFOV","startchecking","be","1<50")
register_event("SetFOV","removechecking","be","1=90")
return PLUGIN_CONTINUE
}