31.07.2011, 19:37
@Rocketeer, I don't know, that this will works, but give it a try.
(NOTE: It's in ZCMD :P)
I don't know that this will works.. I wrote it with notepad, so..
Hope it works, it just a littile sample![Grin](images/smilies/biggrin.gif)
Greetz,
Lets.
(NOTE: It's in ZCMD :P)
pawn Код:
COMMAND:explode(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) // If playerid isn't RCON admin
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not {FF0000}Server Admin!");
return 1;
}
new PlayerId;
if(sscanf(params, "u", PlayerId))
{
SendClientMessage(playerid, 0xFFFFFFFF, "Try again. Usage:{FF0000 }/explode [user id]");
return 1;
}
new Float:Pos[3];
GetPlayerPos(PlayerId, Pos[0], Pos[1], Pos[2]);
SendClientMessage(PlayerId, 0xFF0000FF, "Admin has {FF0000}exploded{FFFFFF} you..");
CreateExplosion(Pos[0], Pos[1], Pos[2], 2, 10.0);
SetTimerEx("AmICheater",50,false,"d",PlayerId);
return 1;
}
forward AmICheater(PlayerId);
public AmICheater(PlayerId)
{
new Float:HP;
HP = GetPlayerHealth(PlayerId);
if(HP == 100 && !IsPlayerAdmin(playerid)) // If player health equals 100 (even after 50 ms after bum :O). And checks if PlayerId isn't a RCON Admin :P
{
SendClientMessage(playerid, 0xFFFFFFFF, "You're cheater :( See you");
Ban(playerid);
return 1;
}
return 1;
}
Hope it works, it just a littile sample
![Grin](images/smilies/biggrin.gif)
Greetz,
Lets.