Vehicle ids not right or something im doing wrong please help
#1

Ok so the code

else if(!strcmp(playername,"BusService",true)) {
PutPlayerInVehicle(playerid,431,0);
SetPlayerColor(playerid,0xFFFFFFFF);

Well i use the vehicle id 431 as an ID for the bus but it appears as a forklift truck can anyone help?
Reply
#2

use variable for this.
new bus1;

OnGameModeInit()

bus1 = AddStatiVehiceEx(modelid, y,x,z,angel,color1,color2,delay);
Reply
#3

Omfg you use ModelID instead of VehicleID...
Reply
#4

How can i find out the modelID?
Reply
#5

YOU USED THE MODELID. YOu have to count to get the Car ID^^

its PutPlayerInVehicle(playerid, CARID, seatid);
Reply
#6

Quote:
Originally Posted by Bl4ckDice
YOU USED THE MODELID. YOu have to count to get the Car ID^^

its PutPlayerInVehicle(playerid, CARID, seatid);
Double-O-Seven just mentioned that 6 minutes before your post:
Quote:
Originally Posted by Double-O-Seven
Omfg you use ModelID instead of VehicleID...
To get the model ID, you have to go to wiki.sa-mp.com and browse the vehicle list. However what you need is the vehicle ID.
This is a real quick example how to tell difference between a model ID and a vehicle ID:
Код:
// OnPlayerCommandText(playerid, cmdtext[])
if(!strcmp(cmdtext, "/test", true))
{
  new modelID = GetVehicleModel(GetPlayerVehicleID(playerid)),
    vehID = GetPlayerVehicleID(playerid),
    str[128];
  format(str, sizeof(str), "model ID -> %d", modelID);
  SendClientMessage(playerid, COLOR, str);
  format(str, sizeof(str), "vehicle ID -> %d", vehID);
  SendClientMessage(playerid, COLOR, str);
  return true;
}
Reply
#7

I noticed it, but i want to repeat it for him. Be carefull^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)