command not working ZCMD
#1

Hi just finished making my job commands for a trucker job and even if i am in a Mule (414) and i am a trucker, i still cannot use /startjob, i dont get a error it just dosn't work. This time i made sure i included the return 1; at the end but i think this may be different. Here is the script for /startjob.

pawn Код:
CMD:startjob(playerid, params[])
{
    if(IsPlayerInVehicle(playerid, 414))
    {
        if(pJob[playerid] == TRUCKER)
        {
            SendClientMessage(playerid, COLOR_WHITE, ".:: You have started work ::.");
            SetPlayerCheckpoint(playerid, -1580.2484,74.9872,3.5547, 3.0);
            trucking[playerid] = 1;
            return 1;
        }
     SendClientMessage(playerid, COLOR_SYNTAX, ".:: You must be a trucker to work in this vehicle ::.");
    }
    return 1;
}
Reply
#2

pawn Код:
CMD:startjob(playerid, params[])
{
    if(IsPlayerInVehicle(playerid, 414))
    {
        if(pJob[playerid] == TRUCKER)
        {
            SendClientMessage(playerid, COLOR_WHITE, ".:: You have started work ::.");
            SetPlayerCheckpoint(playerid, -1580.2484,74.9872,3.5547, 3.0);
            trucking[playerid] = 1;
            return 1;
        }
     else SendClientMessage(playerid, COLOR_SYNTAX, ".:: You must be a trucker to work in this vehicle ::.");
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by McCarthy
Посмотреть сообщение
pawn Код:
CMD:startjob(playerid, params[])
{
    if(IsPlayerInVehicle(playerid, 414))
    {
        if(pJob[playerid] == TRUCKER)
        {
            SendClientMessage(playerid, COLOR_WHITE, ".:: You have started work ::.");
            SetPlayerCheckpoint(playerid, -1580.2484,74.9872,3.5547, 3.0);
            trucking[playerid] = 1;
            return 1;
        }
     else SendClientMessage(playerid, COLOR_SYNTAX, ".:: You must be a trucker to work in this vehicle ::.");
    }
    return 1;
}
Well number 1, that didnt work and number 2. Im pretty sure that when you help somebody out your supposed to explain to them what you actually did instead of pasting code
Reply
#4

You use the function wrong. IsPlayerInVehicle wants the vehicle id and not the model number. So you could check in the player is in any vehicle and use GetVehicleModel to check if it is 414.
Reply
#5

True, didn't pay that much attention D:
Reply
#6

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
You use the function wrong. IsPlayerInVehicle wants the vehicle id and not the model number. So you could check in the player is in any vehicle and use GetVehicleModel to check if it is 414.
Thanks so much, about to test it right now
Reply
#7

Tested it, still the server didnt acknowledge the command, not even a not recognised command :/
Reply
#8

Compile it.....
Reply
#9

Quote:
Originally Posted by Quinlynn
Посмотреть сообщение
Compile it.....
...im not dumb i know how to compile, how else do you think it recognises everything else except from this. My script works just not this specific command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)