03.04.2014, 05:06
How can i script.. when player type this "OMG" when they send that text it will automatically "Oh my god"
Thanks in advance!
Thanks in advance!
public OnPlayerText(playerid, text[])
{
if(!strcmp(text, "OMG", true))
{
SendPlayerMessageToAll(playerid, "Oh My God");
return 0;
}
return 1;
}
Here it is
pawn Код:
|
if(strfind("OMG", "OMG", true) != -1)
{
new str[80], name[24];
GetPlayerName(playerid, name, sizeof(name));
format(str,sizeof(str), "%s(%d): Oh my god!", name, playerid);
SendClientMessageToAll(str, -1);
}