Vehicle shop
#1

Hi i want to know how to create menu where i can spawn cars
Код:
{
  switch(row)
  {
    case 0: //Grove Street
    {
      SetPlayerPos(playerid,201.9625,-2367.1133,1.9186);
			SetPlayerFacingAngle(playerid,32.5490);
			SetPlayerInterior(playerid,0);
			SetCameraBehindPlayer(playerid);
			PutPlayerInVehicle(playerid, vehicleid, 0);//Here!
			GameTextForPlayer(playerid,"~g~You bought ~w~[Elegy]~g~ 1400$",6000,4);
      	MoveObject(gauto,196.049881, -2361.092529, 7.290154, 3); //open garage
      	TogglePlayerControllable(playerid, true);
    }
I dont know why my car didnt spawns
Reply
#2

Do something like:
pawn Код:
new Car;
OnGameModeInit:
pawn Код:
Car = CreateVehicle..
//Or
Car = AddStaticVehicle..
PutPlayerInVehicle:
pawn Код:
PutPlayerInVehicle(playerid,Car,0);
Reply
#3

pawn Код:
case 0: //Grove Street
    {
         SetPlayerPos(playerid,201.9625,-2367.1133,1.9186);
        SetPlayerFacingAngle(playerid,32.5490);
        SetPlayerInterior(playerid,0);
        SetCameraBehindPlayer(playerid);
        new car;
         car=CreateVehicle(model, 201.9625,-2367.1133,1.9186, 32.5490, -1, -1, -1);
        PutPlayerInVehicle(playerid, car, 0);
        GameTextForPlayer(playerid,"~g~You bought ~w~[Elegy]~g~ 1400$",6000,4);
        MoveObject(gauto,196.049881, -2361.092529, 7.290154, 3); //open garage
        TogglePlayerControllable(playerid, true);
    }
make to this


Hope it works
Reply
#4

Thanks Jeffry, but how to make car destroyer ? when player leave server, his car/s will be destroyed ?
Reply
#5

I really donґt know this. Lol, if i knew this, it would help me too.
But nice that it works so far.

Does anyone know how to do that?
Reply
#6

log time ago on my old server i had a nrg detroy cript but i cant remember

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)