06.01.2018, 16:51
I want to let my law enforcement faction to have the medic cmds.
Is this correct?
The //if(PlayerInfo[playerid][pMember] == 11 && PlayerInfo[playerid][pDivision] == 5) is the line I think is correct in order to give my law enforcement faction access to medic cmd.
Is this correct?
Код:
CMD:getpt(playerid, params[]) { if(IsAMedic(playerid)) //if(PlayerInfo[playerid][pMember] == 11 && PlayerInfo[playerid][pDivision] == 5) { new string[128], giveplayerid; if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /getpt(patient) [player]"); if(IsPlayerConnected(giveplayerid)) { if (giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You cannot accept your own Emergency Dispatch call!"); return 1; } if(GetPVarInt(giveplayerid,"MedicCall") == 1) { if(PlayerInfo[giveplayerid][pJailTime] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can't use this command on jailed players."); if(GetPVarInt(giveplayerid, "MASK_USED")) { format(string, sizeof(string), "EMS Driver %s has accepted the Emergency Dispatch call for (%d) [Unknown].",GetPlayerNameEx(playerid),giveplayerid); } else { format(string, sizeof(string), "EMS Driver %s has accepted the Emergency Dispatch call for (%d) %s.",GetPlayerNameEx(playerid),giveplayerid,GetPlayerNameEx(giveplayerid)); } SendGroupMessage(3, TEAM_MED_COLOR, string); format(string, sizeof(string), "* You have accepted EMS Call from %s, you will see the marker until you have reached it.",GetPlayerNameEx(giveplayerid)); SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* EMS Driver %s has accepted your EMS Call; please wait at your current position.",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string); GameTextForPlayer(playerid, "~w~EMS Caller~n~~r~Go to the red marker.", 5000, 1); EMSCallTime[playerid] = 1; EMSAccepted[playerid] = giveplayerid; SetPVarInt(giveplayerid, "EMSAttempt", 1); PlayerInfo[playerid][pCallsAccepted]++; } else { SendClientMessageEx(playerid, COLOR_WHITE, "The person has not requested any EMS attention!"); } } } return 1; }