PDA

View Full Version : Spawn Help


MBilal
27/09/2013, 06:49 AM
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

Accord
27/09/2013, 06:52 AM
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.

MBilal
27/09/2013, 07:14 AM
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

MAFIAWARS
27/09/2013, 07:18 AM
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 !

MBilal
27/09/2013, 07:20 AM
There is no Warning in Console

Accord
27/09/2013, 07:44 AM
Try this:


forward Freeze(playerid);
public OnPlayerRequestClass(playerid, classid)
{
SpawnPlayer(playerid);
TogglePlayerControllable(playerid, 0);
return SetTimerEx("Freeze", 5000, false, "i", playerid);
}

public Freeze(playerid) return TogglePlayerControllable(playerid, 1);

MBilal
27/09/2013, 10:13 AM
Thanks For help but already Fixed