CMD:attp(playerid, params[]) { new gteam[MAX_PLAYERS], adminname[MAX_PLAYER_NAME], Team, Float:x, Float:y, Float:z; if(PlayerInfo[playerid][pAdmin] >=4 || IsPlayerAdmin(playerid)) { if(sscanf(params, "ui", Team)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /attp [Team id]"); if (Team > 1 || Team < 0 ) return SendClientMessage(playerid, COLOR_RED,"[ERROR]: Valid world number: 0-1!"); GetPlayerTeam(Team, gteam, sizeof(Team)); GetPlayerName(playerid, adminname, sizeof(adminname)); new str[128]; format(str,128,"%s [ID %d] has teleported %i Team!",adminname, playerid, Team); SendClientMessageToAll(COLOR_BLUE,str); GetPlayerPos(playerid, x, y, z); if(GetPlayerTeam(playerid) == Team) { SetPlayerPos(playerid, x, y, z); TogglePlayerControllable(playerid, 0); } return 1; } else return SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!"); }
C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(454) : warning 202: number of arguments does not match definition C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(454) : warning 202: number of arguments does not match definition
i have this but given me 2 error.
Код:
CMD:attp(playerid, params[]) { new gteam[MAX_PLAYERS], adminname[MAX_PLAYER_NAME], Team, Float:x, Float:y, Float:z; if(PlayerInfo[playerid][pAdmin] >=4 || IsPlayerAdmin(playerid)) { if(sscanf(params, "ui", Team)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /attp [Team id]"); if (Team > 1 || Team < 0 ) return SendClientMessage(playerid, COLOR_RED,"[ERROR]: Valid world number: 0-1!"); GetPlayerTeam(Team, gteam, sizeof(Team)); GetPlayerName(playerid, adminname, sizeof(adminname)); new str[128]; format(str,128,"%s [ID %d] has teleported %i Team!",adminname, playerid, Team); SendClientMessageToAll(COLOR_BLUE,str); GetPlayerPos(playerid, x, y, z); if(GetPlayerTeam(playerid) == Team) { SetPlayerPos(playerid, x, y, z); TogglePlayerControllable(playerid, 0); } return 1; } else return SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!"); } Код:
C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(454) : warning 202: number of arguments does not match definition C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(454) : warning 202: number of arguments does not match definition |
if(sscanf(params, "ui", Team))
native GetPlayerTeam(playerid);
GetPlayerTeam(Team, gteam, sizeof(Team)); //error
PHP код:
|
C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(454) : warning 202: number of arguments does not match definition C:\Users\Aref\Desktop\Aref\sampserver\pawno\CODv2.pwn(454) : warning 202: number of arguments does not match definition