SA-MP Forums Archive
Dealership help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dealership help (/showthread.php?tid=216603)



Dealership help - THE_KNOWN - 25.01.2011

Can you help me how to create cars for specific players in-game?
here the code

Код:
if(dialogid==25)//the dialog which pops up when player enters the vehicle at dealership
	    {
	    if(response)
	        {
			Money[playerid] = GetPlayerMoney(playerid);
			if(Money[playerid]<300000) return SendClientMessage(playerid, red, "You dont have enough money.");
 			Veh[playerid]=GetPlayerVehicleID(CreateVehicle(515,659.2692,1850.1108,6.4836,170.6889,13,88, -1));
			PutPlayerInVehicle(playerid, Veh[playerid], 0);
			}



Re: Dealership help - Not available - 25.01.2011

THIS is wrong:
pawn Код:
Veh[playerid]=GetPlayerVehicleID(CreateVehicle(515,659.2692,1850.1108,6.4836,170.6889,13,88, -1));
Should be:
pawn Код:
Veh[playerid] = CreateVehicle(515,659.2692,1850.1108,6.4836,170.6889,13,88, -1);



Re: Dealership help - THE_KNOWN - 25.01.2011

But How Do i Get Its ID?(so that i can assign it for one player only)


Re: Dealership help - Not available - 25.01.2011

Quote:
Originally Posted by THE_KNOWN
Посмотреть сообщение
But How Do i Get Its ID?(so that i can assign it for one player only)
CreateVehicle() is already returning the created vehicles ID. So it's already assigned to the player.


Re: Dealership help - THE_KNOWN - 25.01.2011

hm.. i got that working but now i want it to show like if someone else enters his veh it should show so n so has entered your vehicle