13.02.2014, 10:17
I am using ZCMD and sscanf:
Srry for any mistakes as i am on mobile.
And ye, u made it if the player is not admin the it will work. And u checked if the player is only then it will send message that the player is not online
Код:
CMD:setusa(playerid, params) { if (IsPlayerAdmin(playerid)) new id; if(sscanf(params, "u", id)) if (IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Invalid Player"); SetPlayerTeam(id, 0); SetPlayerColor(id, COLOR_BLUETEAM); gTeam[id] = TEAM_USA; new pname1[MAX_PLAYER_NAME], string[58]; GetPlayerName(id, pname1, MAX_PLAYER_NAME); format(string, sizeof (string), "You Set %s (%d) Team To {0x0000FF}USA", pname1, id); return 1; }
And ye, u made it if the player is not admin the it will work. And u checked if the player is only then it will send message that the player is not online