Little Error
#1

pawn Код:
new GodMode[ MAX_PLAYERS ];
#if defined Use_DW_Rcon_Admin_System
CMD:rgod( playerid, params[ ] )
{
    CheckRconAdmin( playerid );
   
    if( GodMode == 0 )
    {
        SetPlayerHealth( playerid, 99999 );
        SendClientMessage( playerid, COLOR_WHITE, "God Mode Activated.");
    }
    else if( GodMode == 1 )
    {
        SetPlayerHealth( playerid, 100 );
        SendClientMessage( playerid, COLOR_WHITE, "God Mode Deactivated.");
    }
    return 1;
}
#endif
Код:
C:\Documents and Settings\Mureseanu\My Documents\Altele\Rock's Server\gamemodes\--.pwn(166) : error 033: array must be indexed (variable "GodMode")
C:\Documents and Settings\Mureseanu\My Documents\Altele\Rock's Server\gamemodes\--.pwn(171) : error 033: array must be indexed (variable "GodMode")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

pawn Код:
CMD:rgod( playerid, params[ ] )
{
    CheckRconAdmin( playerid );
   
    if( GodMode[playerid] == 0 )
    {
        SetPlayerHealth( playerid, 99999 );
        SendClientMessage( playerid, COLOR_WHITE, "God Mode Activated.");
    }
    else if( GodMode[playerid] == 1 )
    {
        SetPlayerHealth( playerid, 100 );
        SendClientMessage( playerid, COLOR_WHITE, "God Mode Deactivated.");
    }
    return 1;
}
Should work
Reply
#3

Thanks.

So simple...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)