27.11.2011, 16:26
Hello,
I need this line to be able to be used in a zcmd script:
This is what i need it for:
Thx in advance
I need this line to be able to be used in a zcmd script:
PHP код:
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 3 || PlayerInfo[playerid][pAdmin] >= 1)
PHP код:
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;
}