Dealership help
#1

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);
			}
Reply
#2

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);
Reply
#3

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

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.
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)