Quote:
Originally Posted by RealCop228
You don't need to use sscanf there, it would be slower in this situation. Try doing this;
pawn Код:
COMMAND:r(playerid, params[]) { new msg[128], copname[40]; if(PlayerInfo[playerid][pFaction] == 0) return SendClientMessage(playerid,COLOR_WHITE," You are not in a faction"); if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /®adio [message]"); GetPlayerName(playerid, copname, sizeof(copname)); for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction]) { format(msg, sizeof(msg), "%s (%i - %s): %s, over.", copname, PlayerInfo[playerid][pFRank], PlayerInfo[playerid][pFRankName], params); SendClientMessage(i, COLOR_BLUE, msg); } } return 1; }
|
Thanks for that. I edited all my commands simmilar to /r (like /me, /do, /s ...).