Guten Tag ich bekomme einen error bei givegun
ocmd:givegun(playerid, params[])
{
if(sInfo[playerid][alevel] >= 3)
{
new target, gun, string[128];
if(sscanf(params, "ud", target, gun))
{
SendClientMessage(playerid, COLOR_RED, "Tipp: /givegun <playerid> <gun>");
return 1;
}
if(gun < 1 || gun > 47) { SendClientMessage(playerid, COLOR_RED, "Don't go below 1 or above 47."); return 1; }
if(IsPlayerConnected(target))
{
if(target != INVALID_PLAYER_ID && gun <= 20 || gun >= 22)
{
GivePlayerValidWeapon(target, gun, 50000);
format(string, sizeof(string), "Admin %s has given you a weapon.", getPlayerName(playerid));
SendClientMessage(target, COLOR_RED, string);
format(string, sizeof(string), "You have given %s a weapon.", getPlayerName(target));
SendClientMessage(playerid, COLOR_RED, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
return 1;
}
return 1;
}