10.11.2014, 20:21
Hey guys
I made this /pm command from a tutorial but the problem is, players can only send a few words. What should I do to make the players able to send longer PMs?
Thanks for help.
I made this /pm command from a tutorial but the problem is, players can only send a few words. What should I do to make the players able to send longer PMs?
Код:
CMD:pm(playerid, params[]) { new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME]; if(sscanf(params, "us", id, str2)) { SendClientMessage(playerid, COLOR_YELLOW, "Usage: /pm <id> <message>"); return 1; } if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_YELLOW, "ERROR: Player not connected"); if(playerid == id) return SendClientMessage(playerid, COLOR_YELLOW, "ERROR: You cannot pm yourself!"); { GetPlayerName(playerid, Name1, sizeof(Name1)); GetPlayerName(id, Name2, sizeof(Name2)); format(str, sizeof(str), "(( PM To %s(ID %d): %s ))", Name2, id, str2); SendClientMessage(playerid, COLOR_YELLOW, str); format(str, sizeof(str), "(( PM From %s(ID %d): %s ))", Name1, playerid, str2); SendClientMessage(id, COLOR_YELLOW, str); } return 1; }