[Include] zmessage - multi-line messages with whole words shifts.
#10

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;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)