28.03.2016, 19:59
I found the problem, it was my stupid fault of not loading the sscanf plugin in the server config -.-
Well doing that, i made a /giveweapon command, the only thing is, it keeps saying: You have to be level 3 to use that command!
This is the giveweapon code
Well doing that, i made a /giveweapon command, the only thing is, it keeps saying: You have to be level 3 to use that command!
This is the giveweapon code
Code:
CMD:giveweapon(playerid, params[])
{
if(PInfo[playerid][Level] > 3)
{
new PID;
new gun;
new ammo;
new str[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us[64]", PID, gun, ammo)) return SendClientMessage(playerid, ORANGE, "USAGE: /giveweapon [playerid][weaponid][ammo]");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, ORANGE, "Player is not connected!");
format(str, sizeof(str), "'%s' gave weapons to '%s'.", Adminname, Playername);
SendClientMessageToAll(GREEN, str);
GivePlayerWeapon(PID, gun, ammo);
}
else
{
SendClientMessage(playerid, ORANGE, "You have to be level 3 to use that command!");
}
return 1;
}

