22.04.2012, 02:24
so if a person says Fu** you it applys this anim..how do i do it ?
ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0, 0);
ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0, 0);
public OnPlayerText(playerid, text[])
{
if(strfind(text, "fuck you", true) != -1 || strfind(text, "fuck u", true) != -1) ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0, 0);
return 1;
}
public OnPlayerText(playerid, text[])
{
if(strfind(text, "fuck you", true) != -1 || strfind(text, "fuck u", true) != -1)
{
ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0, 0);
return 0;
}
return 1;
}
new gBadWords[][] = {
"fuck",
"shit",
"bitch"
// etc.
};
public OnPlayerText(playerid, text[])
{
for(new i=0; i<sizeof(gBadWords); i++)
{
if(strfind(text, gBadWords[i], true) != -1)
{
ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0, 0);
return 0;
}
}
return 1;
}
for(new i=0; i<sizeof(gBadWords); i++)
{
if(strfind(text, gBadWords[i], true) != -1)
{
if(IsPlayerInAnyVehicle(playerid))
{
ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0, 0);
return 0;
}
}
if(GetPlayerState(playerid) == 1) // onfoot
{
for(new i=0; i<sizeof(gBadWords); i++)
{
if(strfind(text, gBadWords[i], true) != -1)
{
ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0, 0);
return 0;
}
}
}