09.08.2011, 12:25
I put this code on OnPlayerUpdate:
if(GetPlayerAnimationIndex(playerid))
{
new animlib[32],animname[32],acname[MAX_PLAYER_NAME];
GetPlayerName(playerid, acname, sizeof(acname));
GetAnimationName(GetPlayerAnimationIndex(playerid) ,animlib,32,animname,32);
if(strcmp(animlib, "PED", true) == 0)
{
if(strcmp(animname, "RUN_PLAYER", true) == 0)
{
format(string, sizeof(string), "AdmWarn: %s[%d] possibly CJ Running", acname,playerid);
ABroadCast(COLOR_YELLOW,string,1);
}
}
return 1;
}
It works good but when the player is CJ running it spamms the whole chat..
anyone can help ?
if(GetPlayerAnimationIndex(playerid))
{
new animlib[32],animname[32],acname[MAX_PLAYER_NAME];
GetPlayerName(playerid, acname, sizeof(acname));
GetAnimationName(GetPlayerAnimationIndex(playerid) ,animlib,32,animname,32);
if(strcmp(animlib, "PED", true) == 0)
{
if(strcmp(animname, "RUN_PLAYER", true) == 0)
{
format(string, sizeof(string), "AdmWarn: %s[%d] possibly CJ Running", acname,playerid);
ABroadCast(COLOR_YELLOW,string,1);
}
}
return 1;
}
It works good but when the player is CJ running it spamms the whole chat..
anyone can help ?