10.02.2012, 15:20
I have a little bug. When I respond to PM a /r [text], the recipient does not receive the words that I wrote after intervals.
Text after the first space is not visible (by /r [text])
Text after the first space is not visible (by /r [text])
Код:
if(strcmp(cmd, "/r", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /r [text]"); return 1; } giveplayerid = GetPVarInt(playerid, "LastID"); if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { format(string, sizeof(string), "* PM from %s(ID: %d): %s", PlayerName(playerid), playerid, tmp); SendClientMessage(giveplayerid, 0xffff00ff, string); } } format(string, sizeof(string), "* PM to %s(ID: %d): %s", giveplayer, giveplayerid, tmp); SendClientMessage(playerid, 0xffff00ff, string); return 1; } } else { SendClientMessage(playerid, 0xFF0000FF, "You didn't have a PM!"); } } return 1; }