Truck job help [+REP]
#1

Alright so how can I make that:If player types /truckjob but is not driving truck vehicle this command will not work.
Reply
#2

Код:
new truck;
truck = GetPlayerVehicleID(playerid);
if((truck != 515) || (truck != 514))//Other trucks, find yourself. https://sampwiki.blast.hk/wiki/Vehicle_M...8.41728859    SendClientMessage(playerid, -1, "Your not in a Truck to use Truck Jobs!");
}
EDIT: == to !=
Reply
#3

that truck = getplayervehicleid thing says that
C:\Users\John\Desktop\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(116) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

nvm solved
Reply
#5

I get this error now
C:\Users\John\Desktop\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(51 : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

Quote:
Originally Posted by [SU]Spartan
Посмотреть сообщение
I get this error now
C:\Users\John\Desktop\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(51 : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
give us the line?
Reply
#7

Код:
#include <ZCMD> //at top of the script

CMD:truckjob(playerid,params[])
{
    new truck;
    truck = GetPlayerVehicleID(playerid);
    if((truck != 515) || (truck != 514))
    {
        SendClientMessage(playerid, -1, "Your not in a Truck to use Truck Jobs!");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)