question
#1

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
Reply
#2

whats this code ?? ?? ??
Reply
#3

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
Reply
#4

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?
Reply
#5

i think ive seen this befour i think some1 said if your frozen it unfreezes you and if ur unfrozen it freezes you
Reply
#6

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)