Command doesn't seem to work.
#1

Okay, so whenever I do this, /v putpackage, it returns me a command to use but the command doesn't exist, so instead I just try to /v putpackage 1 to place my weapon package slot 1 inside the vehicle. Anyone able to help me out? I need help for /v putpackage so this command is able to place a package inside, because it doesn't seem to work.

pawn Код:
if(!strcmp(option, "putpackage", true))
    {
        new id = GetNearestVehicle(playerid), slotid;
        if (sscanf(params, "d", slotid)) return SyntaxMSG(playerid, "/storepackage [slotid]");
        if (id == INVALID_VEHICLE_ID) return SCM(playerid, COLOR_INFO, "You are not near any vehicle.");
        if (PlayerInfo[playerid][pCarKey] != id) return SCM(playerid, COLOR_INFO, "You don't own this vehicle.");
        if (slotid < 1 || slotid > 10) return SCM(playerid, COLOR_LIGHTRED, "Error: The package slot must be between 1 and 10.");
        if (!PlayerInfo[playerid][pGunPackages][slotid-1]) return SCM(playerid, COLOR_LIGHTRED, "Error: There is no package in this slot.");

        for (new i = 0; i < 10; i ++)
        {
            if (!VehicleInfo[id][carPackages][slotid-1])
            {
                VehicleInfo[id][carPackages][slotid-1] = PlayerInfo[playerid][pGunPackages][slotid-1];
                VehicleInfo[id][carPackageAmmo][slotid-1] = PlayerInfo[playerid][pPackageAmmo][slotid-1];

                SCMEx(playerid, COLOR_GREEN, "* You have stored a %s with %d ammo into this vehicle.", GetPackageType(PlayerInfo[playerid][pGunPackages][slotid-1]), PlayerInfo[playerid][pPackageAmmo][slotid-1]);
                SaveVehicle(id);
                return 1;
            }
        }
        SCM(playerid, COLOR_INFO, "There is no room in the vehicle.");
        return 1;
    }
Reply
#2

Fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)