SA-MP Forums Archive
I have a problem - 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: I have a problem (/showthread.php?tid=164522)



I have a problem - ViruZZzZ_ChiLLL - 31.07.2010

Okay, so I have a script that when you spawn you will
be immediately be inside a vehicle :
pawn Код:
public OnPlayerSpawn(playerid)
{
   SetTimerEx("Timer", 2000, false, "i", playerid);
   TogglePlayerControllable(playerid, 1);
   return 1;
}

forward Timer(playerid);
public Timer(playerid)
{
   new Float:x, Float:y, Float:z;
   TogglePlayerControllable(playerid, 0);
   PutPlayerInVehicle(playerid, CreateVehicle(510, x, y, z, 0, -1, -1, -1), 0);
   return 1;
}
Like so. Now I know that putting -1 will not respawn it rite?

But here's the problem :
When the vehicle explodes, and I die of course, then spawn again
I spawn with that vehicle but that vehicle spawns another one.

How can I make it not spawn another one when the vehicle explodes?


Re: I have a problem - Kar - 31.07.2010

onplayer requestspawn

onplayerspawn is called everytime u die