How to replace random car id with the locked car id ?
#1

How to replace random car id with the locked car id ?

pawn Код:
//Top
[B]new myMarkedCar;[/B]
 
public OnGameModeInit() //Or another callback
{
[B]myMarkedCar = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 0,0, -1); //For example: Black Landstalker near Blueberry Acres[/B]
return 1;
}
 
//Whatever your want
public OnVehicleStreamIn(vehicleid, forplayerid)
{
[B]if(vehicleid == myMarkedCar)[/B]
{
SetVehicleParamsForPlayer(TmyMarkedCar, forplayerid, 1, 0); // marker can be visible only if the vehicle streamed for player
}
return 1;
}
Am im i trippn? Or is only going to save a Black Landstalker near Blueberry Acres??

If so how can i make it the exact car thats locked by the player?

:S

EDIT: lol i tried to BOLD where i think needs changing in the code xD

/fail
Reply
#2

In the OnVehicleStreamIn callback, at the line:

Код:
SetVehicleParamsForPlayer(TmyMarkedCar, forplayerid, 1, 0);
There seems to be an extra "T" in front of "myMarkedCar".
I'm new to scripting, but it seems that this can be the problem, as there is no TmyMarkedCar (and will be 0).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)