Vehicle shop - 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: Vehicle shop (
/showthread.php?tid=113129)
Vehicle shop -
Vadonis - 12.12.2009
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
Re: Vehicle shop -
[XST]O_x - 12.12.2009
Do something like:
OnGameModeInit:
pawn Код:
Car = CreateVehicle..
//Or
Car = AddStaticVehicle..
PutPlayerInVehicle:
pawn Код:
PutPlayerInVehicle(playerid,Car,0);
Re: Vehicle shop -
Jeffry - 12.12.2009
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
Re: Vehicle shop -
Vadonis - 12.12.2009
Thanks
Jeffry, but how to make car destroyer ? when player leave server, his car/s will be destroyed ?
Re: Vehicle shop -
Jeffry - 12.12.2009
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?
Re: Vehicle shop -
Vadonis - 12.12.2009
log time ago on my old server i had a nrg detroy cript
but i cant remember