AFK System - String problem
#1

Hii there.
I've a problem :
PHP код:
//new GODAFK;
new PlayerAfkName[MAX_PLAYERS][MAX_PLAYER_NAME+1];
CMD:afk(playeridparams[])
{
    if(
afk[playerid] == && PlayerInfo[playerid][pAdminlvl] == 5)
    {
        if(
ZDM[playerid] != && Dming[playerid] != 2)
        {
            new 
Float:xFloat:yFloat:z;
            
GetPlayerName(playeridPlayerAfkName[playerid][MAX_PLAYER_NAME], sizeof(PlayerAfkName[playerid][MAX_PLAYER_NAME])); // THIS LINE GET A ERROR
            
TogglePlayerControllable(playerid0);
            
GetPlayerHealth(playeridafkHealth[playerid]);
            
SetPlayerHealth(playerid9999999.0);
            
//GODAFK = SetTimerEx("GodMode", 100, true, "i", playerid);
            
GameTextForPlayer(playerid"AFK"40003);
            
GetPlayerPos(playeridxyz);
            new 
Text3D:afk3D Create3DTextLabel("[AFK]",red1xyz4000);
            
Attach3DTextLabelToPlayer(afk3Dplayerid0.00.00.0);
            
afk[playerid] = 2;
            
afkDraw TextDrawCreate(285.00000018.000000,"~r~AFK");
            
TextDrawShowForPlayer(playeridafkDraw);
            return 
1;
        }
        return 
1;
    }
    else if(
afk[playerid] == && ZDM[playerid] != && Dming[playerid] != 2)
    {
        
TogglePlayerControllable(playerid1);
        
//DeletePlayer3DTextLabel(playerid,
        
SetPlayerHealth(playeridafkHealth[playerid]);
        
//KillTimer(GODAFK);
        
TextDrawHideForPlayer(playeridafkDraw);
        
afk[playerid] = 1;
        return 
1;
    }
    else return 
1;

I have an error. I don't know how to resolve it.

PHP код:
C:\--(5807) : error 001expected token"]"but found "-identifier-"
C:\--(5807) : warning 215expression has no effect
C
:\--(5807) : error 001expected token";"but found "]"
C:\--(5807) : error 029invalid expressionassumed zero
C
:\--(5807) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply


Messages In This Thread
AFK System - String problem - by Dayrion - 23.05.2016, 15:58
Re: AFK System - String problem - by Stinged - 23.05.2016, 16:08
Re: AFK System - String problem - by Dayrion - 23.05.2016, 16:09
Re: AFK System - String problem - by luke49 - 23.05.2016, 16:44
Re: AFK System - String problem - by F1N4L - 23.05.2016, 16:53
Re: AFK System - String problem - by Dayrion - 23.05.2016, 17:07
Re: AFK System - String problem - by Stinged - 23.05.2016, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)