A problem with Something
#1

Hello i have a problem with this.

PHP код:
 dcmd_kill(playeridparams[])
{
            
#pragma unused params
            
if(TEAM_COP[playerid] == 1)
            {
            
SendClientMessage(playeridCOLOR_RED"Law Emergent Cant Use This Command");
            }
            
SetPlayerHealth(playerid0);
            new 
string[256], pname[MAX_PLAYER_NAME];
            
GetPlayerName(playeridpnamesizeof(pname));
            
format(stringsizeof(string), "%s has used command '/kill'."pname);
            
SendClientMessageToAll(COLOR_MAROONstring);
            }
            return 
1;

This is the line.

PHP код:
if(TEAM_COP[playerid] == 1
And this is the problem

PHP код:
C:\Users\Arlind\Desktop\1v1 DeathMatch Server (V 1) - Copy\gamemodes\Dm.pwn(465) : error 029invalid expressionassumed zero
C
:\Users\Arlind\Desktop\1v1 DeathMatch Server (V 1) - Copy\gamemodes\Dm.pwn(465) : error 029invalid expressionassumed zero
C
:\Users\Arlind\Desktop\1v1 DeathMatch Server (V 1) - Copy\gamemodes\Dm.pwn(465) : warning 215expression has no effect
C
:\Users\Arlind\Desktop\1v1 DeathMatch Server (V 1) - Copy\gamemodes\Dm.pwn(465) : error 001expected token";"but found "]"
C:\Users\Arlind\Desktop\1v1 DeathMatch Server (V 1) - Copy\gamemodes\Dm.pwn(465) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply
#2

Can to help mee ?
Reply
#3

new gTeam[MAX_PLAYERS];
did you define it?
and
#define TEAM_COP 0
then:
pawn Код:
dcmd_kill(playerid, params[])
{
            #pragma unused params
            if(gTeam[playerid] == TEAM_COP)
            {
            SendClientMessage(playerid, COLOR_RED, "Law Emergent Cant Use This Command");
            }
            SetPlayerHealth(playerid, 0);
            new string[256], pname[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pname, sizeof(pname));
            format(string, sizeof(string), "%s has used command '/kill'.", pname);
            SendClientMessageToAll(COLOR_MAROON, string);
            }
            return 1;
}
Reply
#4

Dont Work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)