Return value
#1

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    if(!
IsPlayerNPC(playerid))
    {
        if(
pInfo[playerid][pLogged] == 1) { SaveStats(playerid); }
               
DestroyDynamic3DTextLabel(PlayerLabel[playerid]);
         
PlayersAlive--;
          
ResetVars(playerid);
        
DisconnectVars(playerid);
        
DeletePlayerTD(playerid);
        new 
str[256];
          switch(
reason)
        {
            case 
0format(str,sizeof(str),"*"COL_GREEN" %s(%i) a iesit de pe server. Motiv: Timed Out",PlayerName(playerid),playerid);
            case 
1format(str,sizeof(str),"*"COL_GREEN" %s(%i) a iesit de pe server. Motiv: Leaving",PlayerName(playerid),playerid);
            case 
2format(str,sizeof(str),"*"COL_GREEN" %s(%i) a iesit de pe server. Motiv: Kicked/Banned",PlayerName(playerid),playerid);
        }
        
SendMessageToAllAdmins(str,-1);
         if(
IsBeingSpeced[playerid] == 1)
        {
            foreach(
Player,i)
            {
                if(
spectatorid[i] == playerid)
                {
                    
TogglePlayerSpectating(i,false);
                    
giveWeaponAllow[i] = 1;
                }
            }
        }
    }
    return 
1;


I need to return a value to if(!IsPlayerNPC(playerid)) because my Dynamicnametag is not deleting on leaving.
Reply


Messages In This Thread
Return value - by Zeus666 - 20.07.2016, 12:29
Re: Return value - by Zeus666 - 20.07.2016, 18:38
Re: Return value - by Stinged - 20.07.2016, 19:17
Re: Return value - by Zeus666 - 20.07.2016, 19:18

Forum Jump:


Users browsing this thread: 1 Guest(s)