C:\Users\tadej\Desktop\SAMP\gamemodes\FMJ2.0.pwn(427) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
if(sscanf(params, "us[70]", targetid, reason))return SCM(playerid, COLOR_GREY, "[USAGE]: /kick [playerid] [reason]");
new reason;
new reason[71];
Hmm, let me guess you defined 'reason' and a variable not a string
Well if am correct replace this: pawn Код:
pawn Код:
|
new reason[70];
CMD:kick(playerid, params)
{
new targetid;
new reason[70];
new string[200];
if(gPlayerInfo[playerid][pAdminLevel] < gCommands[KICK])return SCM(playerid, COLOR_RED, "[ERROR]: You can't use this command!");
if(sscanf(params, "us[70]", targetid, reason))return SCM(playerid, COLOR_GREY, "[USAGE]: /kick [playerid] [reason]");
if(IsPlayerConnected(targetid))return SCM(playerid, COLOR_RED, "[ERROR]: This player is not connected!");
if(gPlayerInfo[playerid][pAdminLevel] == gPlayerInfo[targetid][pAdminLevel]) return SCM(playerid, COLOR_YELLOW, "[WARNING]: You can't Kick an Admin with a same Level then you!");
if(gPlayerInfo[playerid][pAdminLevel] < gPlayerInfo[targetid][pAdminLevel]) return SCM(playerid, COLOR_YELLOW, "[WARNING]: You can't Kick an Higher Admin then you!");
format(string, sizeof(string), "[Kick]: %s has Kicked %s from the Server!||Reason: %s", GetName(playerid), GetName(targetid), reason);
SCMToAll(COLOR_YELLOW, string);
Kick(targetid);
return 1;
}
CMD:kick(playerid, params)
CMD:kick(playerid, params[])
CMD:kick(playerid, params[])
{
new targetid;
new reason[70];
new string[200];
if(gPlayerInfo[playerid][pAdminLevel] < gCommands[KICK]) return SCM(playerid, COLOR_RED, "[ERROR]: You can't use this command!");
if(sscanf(params, "us[70]", targetid, reason)) return SCM(playerid, COLOR_GREY, "[USAGE]: /kick [playerid] [reason]");
if(IsPlayerConnected(targetid))return SCM(playerid, COLOR_RED, "[ERROR]: This player is not connected!");
if(gPlayerInfo[playerid][pAdminLevel] == gPlayerInfo[targetid][pAdminLevel]) return SCM(playerid, COLOR_YELLOW, "[WARNING]: You can't Kick an Admin with a same Level then you!");
if(gPlayerInfo[playerid][pAdminLevel] < gPlayerInfo[targetid][pAdminLevel]) return SCM(playerid, COLOR_YELLOW, "[WARNING]: You can't Kick an Higher Admin then you!");
format(string, sizeof(string), "[Kick]: %s has Kicked %s from the Server!||Reason: %s", GetName(playerid), GetName(targetid), reason);
SCMToAll(COLOR_YELLOW, string);
Kick(targetid);
return 1;
}