15.03.2012, 12:54
pawn Код:
//Baton Detect
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(GetPlayerWeapon(issuerid) == 3)
{
new string[50],Attacker[MAX_PLAYERS];
GetPlayerName(issuerid, Attacker, sizeof (Attacker));
format(string, sizeof(string), "(INFO) You have been stunned by Officer %s.", Attacker);
SendClientMessage(playerid, COLOR_GOLD, string);
SetPlayerColor(playerid, COLOR_LIGHTGREEN);
SetTimerEx("timer_stunned",20000,false,"i",playerid);
TogglePlayerControllable(playerid, 0);
}
}
return 1;
}