19.01.2012, 19:35
Sure.
Something like that.
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID) {
switch(weaponid) {
case 3: //Police baton!
{
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); //Apply it twice!
TogglePlayerControllable(playerid, 0);
SetTimerEx("ClearAnims", 20*1000, 0, "i", playerid);
}
}
}
return 1;
}
forward ClearAnims(playerid);
public ClearAnims(playerid) { return ClearAnimations(playerid), TogglePlayerControllable(playerid, 1); }