Faction help please please.
#1

PHP код:

#define TEAM_ME 1
new PlayerInfo[MAX_PLAYERS][pInfo];
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/heal"cmdtexttrue10) == 0)
    {
        if(
PlayerInfo[playerid][TEAM_ME]);
        {
            new 
targetid;
            
SetPlayerHealth(targetid,100);
        }
        else
        {
            
SendClientMessage(playerid,0xE00404,"You are not a medic");
        }
        return 
1;
    }
    return 
0;

these are my codes but they are giving erors please help.
Reply
#2

Show me the errors .
Reply
#3

okay here are the errors
PHP код:
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(89) : error 017undefined symbol "pInfo"
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(89) : error 009invalid array size (negativezero or out of bounds)
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(94) : error 017undefined symbol "TEAM_ME"
C:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(94) : error 036: empty statement
C
:\Users\TaLhA XIV\Desktop\samp\filterscripts\factions.pwn(99) : error 029invalid expressionassumed zero
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase


5 Errors

Reply
#4

va rog frumos ma puteti bbaga in factiune tataglia
Reply
#5

https://sampwiki.blast.hk/wiki/GetPlayerTeam

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/heal", cmdtext, true, 10) == 0)
    {
        if(GetPlayerTeam(playerid) == TEAM_ME)
        {
            new targetid;
            SetPlayerHealth(targetid,100);
        }
        else
        {
            SendClientMessage(playerid,0xE00404,"You are not a medic");
        }
        return 1;
    }
    return 0;
}
Reply
#6

https://sampwiki.blast.hk/wiki/GetPlayerTeam

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/heal", cmdtext, true, 10) == 0)
    {
        if(GetPlayerTeam(playerid) == TEAM_ME)
        {
            new targetid;
            SetPlayerHealth(targetid,100);
        }
        else
        {
            SendClientMessage(playerid,0xE00404,"You are not a medic");
        }
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)