SA-MP Forums Archive
Every model vehicle is cannot be used. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Every model vehicle is cannot be used. (/showthread.php?tid=614535)



Every model vehicle is cannot be used. - jimdo - 09.08.2016

When I enter different car with different job.. I keep getting msg that I am not trucker. Even tho, the vehicle is not for trucker job...

pawn Код:
if(GetVehicleModel(vid) == 456)
            {
                if(!strcmp(PlayerInfo[playerid][job],"Trucker",true))
                {
                    SetPlayerCheckpoint(playerid, 1810.2622,-2072.7654,13.5554, 3.0);
                    SetPVarInt(playerid, "ReadyToGetCargo", 1);
                    SendClientMessage(playerid, COLOR_YELLOW, "[Trucker] Enter the checkpoint with your vehicle to load cargo.");
                }
                else
                {
                    Up(playerid);
                    SendClientError(playerid, "You are not Trucker!");
                }
            }



Re: Every model vehicle is cannot be used. - Dayrion - 09.08.2016

Can you show : GetVehicleModel(..)


Re: Every model vehicle is cannot be used. - jimdo - 09.08.2016

At my first post?


Re: Every model vehicle is cannot be used. - Luicy. - 09.08.2016

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Can you show : GetVehicleModel(..)
That's a samp function.


Re: Every model vehicle is cannot be used. - Dayrion - 09.08.2016

Quote:
Originally Posted by Luicy.
Посмотреть сообщение
That's a samp function.
God; i'm so retarded '-'
Can you show the whole callback. I mean there is no errors there; expect maybe the model of the truck?


Re: Every model vehicle is cannot be used. - jimdo - 09.08.2016

There's no error at all.

This script didn't work at all too

pawn Код:
else if(!strcmp(tmp, "job", true, 3))
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientError(playerid, "You are not in any vehicle!");
        if(GetAdminLevel(playerid) < 10) return SendClientError(playerid, CANT_USE_CMD);
        if(!strlen(tmp2) || IsNumeric(tmp2) || strlen(tmp2) > MAX_PLAYER_NAME) return SCP(playerid, "job [name]");
        dini_Set(CarFile(GetPlayerVehicleID(playerid)), "jobname", tmp2);
        SendClientInfo(playerid, "Success: The job has been updated to this vehicle.");
        myStrcpy(Vehicles[GetPlayerVehicleID(playerid)][jobname], tmp2);
    }