Creating car? - 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: Creating car? (
/showthread.php?tid=233395)
Creating car? -
sTreTcheD - 01.03.2011
Why this code dosent work?
Код:
cars[playerid] = CreateVehicle(570,-1389.0077,-244.6209,1042.7842,10.0102,0,1,0);
LinkVehicleToInterior(cars[playerid], 7);
SetPlayerInterior(playerid, 7);
PutPlayerInVehicle(playerid,cars[playerid],0);
I really have no idea.
Re: Creating car? -
JaTochNietDan - 01.03.2011
What goes wrong with it?
What context is the code in? A command?
Re: Creating car? -
sTreTcheD - 01.03.2011
Код:
public spawnplayerintoact(playerid,carid)
{
cars[playerid] = CreateVehicle(570,-1389.0077,-244.6209,1042.7842,10.0102,0,1,0);
LinkVehicleToInterior(cars[playerid], 7);
SetPlayerInterior(playerid,7);
PutPlayerInVehicle(playerid,cars[playerid],0);
SetPlayerRaceCheckpoint(playerid,0,2237.7905,2453.7126,10.7920,2227.3369,2417.5825,10.7970,5);
SendClientMessage(playerid,COLOR_BLUE,"You are teleported to the activity.");
mpps[playerid] = 0;
return 1;
}
Its just not creating the car... Its moving me to the interior and send me the ClientMessage... But the vehicle isnt created.
Re: Creating car? -
JaTochNietDan - 01.03.2011
Having a respawn time of 0 might be problematic, if you don't want it to respawn, set it to -1.