23.04.2012, 19:20
Olб qria uma coisa simples q ainda nгo sei ;p, um comando de parar qualquer animaзгo com enter ! pls REP+
public OnPlayerKeyStateChange ( playerid , newkeys , oldkeys ) if ((newkeys==KEY_SECONDARY_ATTACK)) OnPlayerCommandText(playerid,"/animeoff");
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/animeoff", true))
{
ClearAnimations(playerid);
return 1;
}
return 0;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_SECONDARY_ATTACK)) // Key ( F / Enter )
{
OnPlayerCommandText(playerid,"/animeoff");
}
return 1;
}
pawn Код:
|
new bool:animm[MAX_PLAYERS]; //topo
//ao executar um anim
animm[playerid] = true;
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
if(newkeys & KEY_SECONDARY_ATTACK && animm[playerid] == true)
ClearAnimations(playerid);
animm[playerid] = false;
return true;
}