SA-MP Forums Archive
onplayerspawn - 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: onplayerspawn (/showthread.php?tid=154234)



onplayerspawn - iStarzz - 12.06.2010

Can anyone help me making this, When someones spawn it has to TogglePlayerContrable false, after 1 second i want it to set it for the spawning player to true.

the problem is, i am not sure if this is correct. (the SetTimerEx)
i have this:
pawn Код:
Onplayerspawn:
TogglePlayerControllable(playerid, false);
SetTimerEx("freezefree", 10000, 0, "i", playerid);

//-----------------------------

forward healthoff(playerid);
public healthoff(playerid)
{
    TogglePlayerControllable(playerid, true);
    return 1;
}



Re: onplayerspawn - Dark_Kostas - 12.06.2010

try it lol. But change the healthoff to freezefree, or you will call another public


Re: onplayerspawn - Hiddos - 12.06.2010

pawn Код:
Onplayerspawn:
TogglePlayerControllable(playerid, false);
SetTimerEx("healthoff", 10000, 0, "i", playerid);

//-----------------------------

forward healthoff(playerid);
public healthoff(playerid)
{
    TogglePlayerControllable(playerid, true);
    return 1;
}
Try that.


Re: onplayerspawn - aircombat - 12.06.2010

the public name should be the same as the timer name
Код:
Onplayerspawn:
TogglePlayerControllable(playerid, false);
SetTimerEx("Unfreeze", 10000, 0, "i", playerid);

//-----------------------------

forward Unfreeze(playerid);
public Unfreeze(playerid)
{
	TogglePlayerControllable(playerid, true);
	return 1;
}



Re: onplayerspawn - iStarzz - 13.06.2010

I know, i was tired yesterday and forgot to change some public names