ChangeVehiclePaintJob not working?
#1

I made a command to change the player's vehicle paint job to 0.

Here it is:

pawn Код:
if(strcmp(cmd, "/paint", true) == 0)
    {
      new vehicleid = GetPlayerVehicleID(playerid);

        if(IsPlayerInAnyVehicle(playerid))
        {
          ChangeVehiclePaintJob(vehicleid, 0);
        }

        else return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You need to be in a vehicle!");

        return 1;
    }
But I get the errors:

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\TWoS.pwn(1479) : error 017: undefined symbol "ChangeVehiclePaintJob"
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\TWoS.pwn(1475) : warning 204: symbol is assigned a value that is never used: "vehicleid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Edit: My stupidity level is over 9000 o_O
Reply
#2

The "J" from ChangeVehiclePaintjob should be lower-case.

https://sampwiki.blast.hk/wiki/ChangeVehiclePaintjob
Reply
#3

pawn Код:
if(strcmp(cmd, "/paint", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
  ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 0);
}
else return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You need to be in a vehicle!");
return 1;
}
The J needs to be lower case and you dont need the vehicle ID in a variable

EDIT: Sandra said about the J first
Reply
#4

pawn Код:
if(strcmp(cmd, "/paint", true) == 0){
if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle!");
ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 0);
return 1;
}
Reply
#5

I don't understand why you said it's not working and you just get errors..
Reply
#6

Yes I know, that's why I said i'm stupid
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)