Freeze - 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: Freeze (
/showthread.php?tid=602996)
Freeze -
Ax3l123 - 16.03.2016
PHP Code:
public dmgo()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
SendEventPMessage(COLOR_ADMCHAT,"GO!GO!GO!");
if(IsPlayerInRangeOfPoint(i,3000000,1387.5414,-17.1491,1000.9135))
{
TogglePlayerControllable(i,1);
return 1;
}
}
}
i've got a problem , when this public is executed I get unfreezed but other's don't . Can we find a fix ?
Re: Freeze -
Vince - 16.03.2016
Remove the return; it stops the loop as soon as it finds the first player that's in range. Frankly I don't know why you're using that range check anyway when it's range is about 700 times larger than the SA map.
Re: Freeze -
czerwony03 - 16.03.2016
PHP Code:
public dmgo()
{
SendEventPMessage(COLOR_ADMCHAT,"GO!GO!GO!");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i,3000000,1387.5414,-17.1491,1000.9135))
{
TogglePlayerControllable(i,1);
}
}
return 1;
}
Re: Freeze -
saffierr - 16.03.2016
With that range, you'll freeze everyone within the game lol, reduce the range, just a tip.