01.12.2017, 17:23
Why does this code not work? It starts an infinite loop.
Код:
#define ZMSG_MAX_CHAT_LENGTH 64
#define ZMSG_MAX_PLAYER_CHAT_LENGTH 32
#include <zmessage>
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/yadayada", true) == 0) {
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT", name);
SendClientMessageToAll(0xC4C4C4FF, string);
return 1;
}
return 0;
}

