24.12.2016, 11:44
This is the code
And this is the error
What did I do wrong , I just want to get his IP and use it later..
Код:
CMD:banex(playerid, params[], help) { new id, uip, reason[128], string[256]; if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "Only for admins!"); if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_WHITE, "> /banex <Name/Playerid> <reason>"); if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected."); GetPlayerIp(id, uip, sizeof(uip)); if(PlayerInfo[id][pAdmin] >= 1) { if(PlayerInfo[playerid][pAdmin] >= 4) { format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", RPName(id), RPName(playerid), reason); SendClientMessageToAll(COLOR_LIGHTBLUE, string); BanLog(string); format(string, sizeof(string),"banip %s", uip); SendRconCommand(string); SendRconCommand("reloadbans"); } else { SendClientMessage(playerid, COLOR_GREY, "You can't ban a staff member!"); } return 1; } format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", RPName(id), RPName(playerid), reason); SendClientMessageToAll(COLOR_LIGHTBLUE, string); BanLog(string); format(string, sizeof(string),"banip %s", uip); SendRconCommand(string); SendRconCommand("reloadbans"); return 1; }
Код:
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(1623) : error 035: argument type mismatch (argument 2) C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(1623) : error 035: argument type mismatch (argument 2)