17.08.2014, 12:49
okay i made /giveweaponlicense command but they give me error.
in this line :
and the error is
Command:
anyone can help me?
in this line :
Код:
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveweaponlicense [playerid]");
Код:
(9434) : error 035: argument type mismatch (argument 1)
Код:
CMD:giveweaponlicense(playerid, parmas[])
{
new params, string[64], playerb;
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveweaponlicense [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(!IsAARMY(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not the general");
if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a the general");
if(!PlayerInfo[playerid][pFireArmsLic]) return SendClientMessage(playerid, COLOR_GREY, "The player already have weapon license");
PlayerInfo[playerid][pFireArmsLic] = 1;
format(string, sizeof(string), " You have given %s a weapon license.", NORPN(playerb));
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), " The general %s has given you a weapon license.", NORPN(playerid));
SendClientMessage(playerb, COLOR_WHITE, string);
return 1;
}

