Two doubt about SA: MP 0.3 scripting
#1

1 Doubt - Well, I created a BOT NPC with the plane Nevada (id: 553), did everything right, it connects, only that instead of the plane appears a car, how can I fix this?

2 Doubt - I was seeing in PutPlayerInVehicle(playerid,vehicleid,seatid), the vehicle id is not the same as the AddStaticVehicle, someone could pass me the ID of the vehicles PutPlayerInVehicle(playerid,vehicleid,seatid)?
Reply
#2

Do you mean you are using the model ID to put a player in a vehicle?
Reply
#3

I don't beleave AddStaticVehicle returns a value. Use CreateVehicle instead.

pawn Код:
new veh = AddStaticVehicle();
X

pawn Код:
new veh = CreateVehicle();


Reply
#4

Quote:
Originally Posted by [Tomo
NomNom ]
Do you mean you are using the model ID to put a player in a vehicle?
Look at my script filterscripts\gl_npcs:

Код:
 	else if(!strcmp(playername,"NevadaSF",true)) {
 	  SetSpawnInfo(playerid,69,61,0.0,0.0,0.0,0.0,-1,-1,-1,-1,-1,-1);
Код:
 	else if(!strcmp(playername,"NevadaSF", true)) {
		PutPlayerInVehicle(playerid,553,0);
		SetPlayerColor(playerid,0xFFFFFFFF);
In PutPlayerInVehicle(playerid,vehicleid,seatid), I'm using the ID of the vehicle (which is 533), but instead of appearing a Nevada appears a car

I'm using the Game Mode Grand Larceny
Reply
#5

Quote:
Originally Posted by Zezombia
I don't beleave AddStaticVehicle returns a value. Use CreateVehicle instead.

pawn Код:
new veh = AddStaticVehicle();
X

pawn Код:
new veh = CreateVehicle();


they both return the vehicleID
Reply
#6

Done!

Код:
new NevadaSF;
Код:
	ConnectNPC("NevadaSF","NevadaSF");
Код:
 	else if(!strcmp(playername,"NevadaSF",true)) {
 	  SetSpawnInfo(playerid,69,61,0.0,0.0,0.0,0.0,-1,-1,-1,-1,-1,-1);
Код:
 	else if(!strcmp(playername,"NevadaSF", true)) {
 	NevadaSF = CreateVehicle(553,0.0,0.0,0.0,0.0,0,0,0);
		PutPlayerInVehicle(playerid,NevadaSF,0);
		SetPlayerColor(playerid,0xFFFFFFFF);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)