09.01.2011, 05:13
Create a variable:
Will this work?
pawn Код:
new IsPiss[MAX_PLAYERS];
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/piss", cmdtext, true, 10) == 0)
{
ApplyAnimation(playerid, "PAULNMAC", "Piss_loop", 4.0, 1, 1, 1, 1, 0);
IsPiss[playerid] = 1
return 1;
}
return 0;
}
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
{
if(IsPiss[playerid] == 1)
{
ClearAnimations(playerid);
}
}
return 1;
}