question - 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: question (
/showthread.php?tid=250673)
question -
fissekarl - 24.04.2011
What does this stock do?
pawn Код:
stock TogglePlayerControllable2(playerid, controllable, freezeid=0) //By Gabriel "Larcius" Cordes
{
if(IsPlayerConnected(playerid))
{
new isplfreeze=IsPlayerFreeze(playerid);
if (controllable==0)
{
if(freezeid>=MAX_FREEZE_ALL || freezeid<0)
{
for(new i=0; i<MAX_FREEZE_ALL; i++)
{
Players[playerid][Freeze][i]=0;
}
Players[playerid][Freeze][0]=1;
}
else
{
Players[playerid][Freeze][freezeid]=1;
}
if(!isplfreeze)
{
TogglePlayerControllable(playerid, 0);
#if defined OnPlayerToggleControllable
OnPlayerToggleControllable(playerid, 0);
#endif
}
}
else
{
if(freezeid>=MAX_FREEZE_ALL || freezeid<0)
{
for(new i=0; i<MAX_FREEZE_ALL; i++)
{
Players[playerid][Freeze][i]=0;
}
}
else
{
Players[playerid][Freeze][freezeid]=0;
}
if(isplfreeze && !IsPlayerFreeze(playerid))
{
TogglePlayerControllable(playerid, 1);
#if defined OnPlayerToggleControllable
OnPlayerToggleControllable(playerid, 1);
#endif
}
}
return 1;
}
return 0;
}
Found in Useful Functions .inc
Re: question -
[ADC]Aldi96 - 24.04.2011
whats this code ?? ?? ??
Re: question -
judothijs - 24.04.2011
if you don't know what your own scripts do, you've probably copy/pasted them.
Anyway, I'm quite sure it either freezes and unfreezes a certain player
Re: question -
fissekarl - 24.04.2011
Quote:
Originally Posted by judothijs
if you don't know what your own scripts do, you've probably copy/pasted them.
Anyway, I'm quite sure it either freezes and unfreezes a certain player
|
Didn't you see I wrote that I found it in Useful Functions? It's not my script, it's by some guy (credits at the top of the code), so I am asking what does this code do?
Re: question -
CrazyBlob - 24.04.2011
i think ive seen this befour i think some1 said if your frozen it unfreezes you and if ur unfrozen it freezes you
Re: question -
[SFA]SpiRRiT - 24.04.2011
pawn Код:
if(freezeid>=MAX_FREEZE_ALL || freezeid<0)
{
for(new i=0; i<MAX_FREEZE_ALL; i++)
{
Players[playerid][Freeze][i]=0;
}
Players[playerid][Freeze][0]=1;
}
Doesn't it say something that will answer your question?
MAX_FREEZE_ALL Doesn't it freeze everyone?