Problem with /tradeweapon
#1

I've made a command but there is a bug :/ I want to give a weapon to an id but only if playerid have it! This command works if ammo are shown but if weapon's ammo pass 9999, it returns that i've haven't got any ammo amount.. This bug occurs also if i try to trade a weapon like chainsaw or dildo..
I put some parts of code..

pawn Код:
GetPlayerName(playerid,namewep, sizeof(namewep));
    if(sscanf(params, "udd", pIDwep,armawep,ammowep)) return SendClientMessage(playerid, COLOR_ORANGE, "Usa: /donarma [id] [arma] [munizioni]");
    if(!IsPlayerConnected(pIDwep)) return SendClientMessage(playerid, COLOR_RED,"*** L'id inserito non и attivo!");
    GetPlayerName(pIDwep,pnamewep, sizeof(pnamewep));
    if(armawep < 0 || armawep > 46) return SendClientMessage(playerid, COLOR_RED, "*** Non puoi donare quest'arma!");
    if(armawep == 38 || armawep == 19 || armawep == 20 || armawep == 21) return SendClientMessage(playerid, COLOR_RED, "*** Non puoi donare quest'arma!");
    if(ammowep < 0) return SendClientMessage(playerid, COLOR_RED, "*** Non puoi donare queste munizioni!!");
    if(armawep == 1)
    {
       GetPlayerWeaponData(playerid, 0, realwep, realammo);
       if(realwep != armawep) return SendClientMessage(playerid, COLOR_RED, "*** Non hai quest'arma!");
       if(realammo < ammowep) return SendClientMessage(playerid, COLOR_RED, "*** Non hai queste munizioni!");
       SetTimer("donawep", 100, false);
       return 1;
    }
Reply
#2

Up.. Have you understand what i mean? '-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)