if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 3 || PlayerInfo[playerid][pAdmin] >= 1)
CMD:operation(playerid, params[])
{
new id;
if(sscanf(params, "d", id)) return SendClientMessage(playerid, 0xffffffff, "[Usage]: /operation <playerid>");
if(gTeam[playerid] != TEAM_MEDIC) return SendClientMessage(playerid, 0xffffffff, "You're not medic!");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xffffffff, "Invalid playerid!");
if(!Injured[id]) return SendClientMessage(playerid, 0xffffffff, "This person isn't injured!");
TogglePlayerControllable(id, 0);
TogglePlayerControllable(playerid, 0);
SendClientMessage(id, 0xffffffff, "A medic started to operate you!");
SendClientMessage(playerid, 0xffffffff, "You started an operation!");
SetTimerEx("OperationFinish", 180000, 0, "dd", playerid, id);
return 1;
}
CMD:operation(playerid, params[])
{
new id;
if(sscanf(params, "d", id)) return SendClientMessage(playerid, 0xffffffff, "[Usage]: /operation <playerid>");
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 3 || PlayerInfo[playerid][pAdmin] >= 1) return SendClientMessage(playerid, 0xffffffff, "You're not medic!");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xffffffff, "Invalid playerid!");
if(!Injured[id]) return SendClientMessage(playerid, 0xffffffff, "This person isn't injured!");
TogglePlayerControllable(id, 0);
TogglePlayerControllable(playerid, 0);
SendClientMessage(id, 0xffffffff, "A medic started to operate you!");
SendClientMessage(playerid, 0xffffffff, "You started an operation!");
SetTimerEx("OperationFinish", 180000, 0, "dd", playerid, id);
return 1;
}
Tried that.
(95) : error 017: undefined symbol "PlayerInfo" (95) : warning 215: expression has no effect (95) : error 001: expected token: ";", but found "]" (95) : error 029: invalid expression, assumed zero PHP код:
|
new PlayerInfo[MAX_PLAYERS][Your_Enum];
Is your variable ?
pawn Код:
|
PlayerInfo
enum Your_Enum
{
pFaction,
};
Dude, you just added on your command
pawn Код:
|
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define FILTERSCRIPT
#define TEAM_MEDIC 0
static gTeam[MAX_PLAYERS];
new bool:Injured[MAX_PLAYERS];
new DeathTimer[MAX_PLAYERS];
new RecoveryTimer[MAX_PLAYERS] = -1;
public OnFilterScriptInit()
{
SetTimer("HealthChecker", 1000, 1);
return 1;
}
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 3 || PlayerInfo[playerid][pAdmin] >= 1) return SendClientMessage(playerid, 0xffffffff, "You're not medic!");
God!
You added something you found and thats it? pawn Код:
|