Weapon ID won't return
#5

Here's the code for /trunk check command

pawn Код:
if (strcmp("check", option, true, 4) == 0){
                    new str[50], weapname[20];
                    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                    if(boot == 0) return SendClientMessage(playerid, COLOR_RED, "[ERROR:] The trunk is closed.");
                    SendClientMessage(playerid, COLOR_USAGE, "___________Trunk___________");
                    if(vInfo[vid][TrunkWeapon1] != 0){
                        format(str, sizeof(str), "Weapon Slot 1: %s", GetWeaponName(vInfo[vid][TrunkWeapon1], weapname, sizeof(weapname)));
                        SendClientMessage(playerid, COLOR_USAGE, str)
                    }
                    if(vInfo[vid][TrunkWeapon2] != 0){
                        format(str, sizeof(str), "Weapon Slot 2: %s", GetWeaponName(vInfo[vid][TrunkWeapon2], weapname, sizeof(weapname)));
                        SendClientMessage(playerid, COLOR_USAGE, str);
                    }
                    if(vInfo[vid][TrunkWeapon3] != 0){
                        format(str, sizeof(str), "Weapon Slot 3: %s", GetWeaponName(vInfo[vid][TrunkWeapon3], weapname, sizeof(weapname)));
                        SendClientMessage(playerid, COLOR_USAGE, str);
                    }
                    if(vInfo[vid][TrunkArmor] != 0){
                        format(str, sizeof(str), "Armor: %s", vInfo[vid][TrunkArmor]);
                        SendClientMessage(playerid, COLOR_USAGE, str);
                    }
                    if(vInfo[vid][TrunkMoney] != 0){
                        format(str, sizeof(str), "Money: %s", vInfo[vid][TrunkMoney]);
                        SendClientMessage(playerid, COLOR_USAGE, str);
                    }
                    SendClientMessage(playerid, COLOR_USAGE, "___________________________");
               
                    return PlayerActionMsg(playerid, "check the trunk of the vehicle.");   
                }
               
                if (strcmp("store", option, true, 4) == 0){
                    new option2[50], number, Float:Armor;
                    if(sscanf(params, "s[30]s[30]", option, option2)) return SendClientMessage(playerid, COLOR_USAGE, "[USAGE:] /trunk store weapon | armor | money.");
                    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                    if(boot == 0) return SendClientMessage(playerid, COLOR_RED, "[ERROR:] The trunk is closed.");
                   
                    if (strcmp("weapon", option2, true, 4) == 0){
                        if(GetPlayerScore(playerid) == 1) return SendClientMessage(playerid, COLOR_RED, "[ERROR:] You need to be level 2 or above to use this.");
                        if(GetPlayerWeapon(playerid) == 0) return SendClientMessage(playerid, COLOR_RED, "[ERROR:] You are not holding a weapon.");
                        new str[80], weapname[20];
                        vInfo[vid][TrunkWeapon1] = GetPlayerWeapon(playerid);
                        print(vInfo[vid][TrunkWeapon1]);
                        GetWeaponName(vInfo[vid][TrunkWeapon1], weapname, sizeof(weapname))
                        format(str, sizeof(str), "stores %s in the trunk of the vehicle", weapname);
                        return PlayerActionMsg(playerid, str)
                    }
                 }
Reply


Messages In This Thread
Weapon ID won't return - by Outcast - 08.01.2012, 07:51
Re: Weapon ID won't return - by Jochemd - 08.01.2012, 07:56
Re: Weapon ID won't return - by Outcast - 08.01.2012, 08:04
Re: Weapon ID won't return - by Jochemd - 08.01.2012, 08:16
Re: Weapon ID won't return - by Outcast - 08.01.2012, 08:20
Re: Weapon ID won't return - by Jochemd - 08.01.2012, 08:25
Re: Weapon ID won't return - by Outcast - 08.01.2012, 08:31
Re: Weapon ID won't return - by Jochemd - 08.01.2012, 08:31

Forum Jump:


Users browsing this thread: 1 Guest(s)