SA-MP Forums Archive
Spawn Help - 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)
+--- Thread: Spawn Help (/showthread.php?tid=466298)



Spawn Help - MBilal - 27.09.2013

Hi Guyz i need help ,i want player didnt spawn untill map load because when player spawn in Interior it fall ....... i want player didnt spawn untill map load
i hope you Guyz help me Thanks



Re: Spawn Help - Accord - 27.09.2013

You simply need to freeze the player's body few seconds until the map gets loaded, add a timer of around 5 seconds(depends how big the map is) and eventually unfreeze him. If you have no clue how to do any of this, please send the code and I'll take care of that for you.


Re: Spawn Help - MBilal - 27.09.2013

Code:
forward Spawn(playerid);
public OnPlayerRequestClass(playerid, classid)
{
SetTimerEx("Spawn", 1000, false, "i", playerid);
return 1;
}

public Spawn(playerid)
{
    SpawnPlayer(playerid);
}
i add this it keep spawning me It cant stop


Re: Spawn Help - MAFIAWARS - 27.09.2013

That happens to me, When you are doing F5 to Compile, You are not finding errors right? But You can see Errors in Console. "THAT ARE ERRORS" which are not judging the Player Class...

Please Check your Console and make sure to solve the warnings.

Thanks !


Re: Spawn Help - MBilal - 27.09.2013

There is no Warning in Console


Re: Spawn Help - Accord - 27.09.2013

Try this:

PHP Code:
forward Freeze(playerid);
public 
OnPlayerRequestClass(playeridclassid)
{
    
SpawnPlayer(playerid);
    
TogglePlayerControllable(playerid0);
    return 
SetTimerEx("Freeze"5000false"i"playerid);
}

public 
Freeze(playerid) return TogglePlayerControllable(playerid1); 



Re: Spawn Help - MBilal - 27.09.2013

Thanks For help but already Fixed