05.03.2019, 06:17
It's not showing available ems calls
Another scripting problem is in name,
р < This sybmol
Code:
Thats the fmdranks variable
PHP код:
CMD:emscalls(playerid,params[]){
if(PlayerInfo[playerid][pFaction]!=FACTION_FMD)return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
SendClientMessage(playerid, COLOR_WHITE, "________________| Available EMS Calls |_________________");
new m[512],line[512];
for(new i=0;i<MAX_PLAYERS;i++){
if(EMSCall[i][ems_called]){
format(m, sizeof(m), "%i. %s - %s || Accepted by %s\n", i,PlayerICName(i), GetLocation(EMSCall[i][ems_pos][0], EMSCall[i][ems_pos][1], EMSCall[i][ems_pos][2]),PlayerICName(EMSCall[i][ems_acceptedby]));
strcat(m, line, sizeof(line));
}
}
SendClientMessage(playerid, 0xE4A3E2FF, line);
return 1;
}
Код:
[13:19:48] [DISPATCH] р Trainee Akib Khan accepted EMS call of . [13:19:49] ** You arrived at the scene **
Code:
PHP код:
CMD:acceptcall(playerid,params[]){
if(PlayerInfo[playerid][pFaction]!=FACTION_FMD)return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
new id,m[512];
if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_GREY, "Usage:{FFFFFF} /acceptcall [ID], use /emscalls to see available calls and their id.");
if(!EMSCall[id][ems_called]) return SendClientMessage(playerid, COLOR_RED, "Error:{FFFFFF} This player not called for EMS.");
if(EMSCall[id][ems_acceptedby]) return SendClientMessage(playerid, COLOR_GREY, "Someone already accepted this call.");
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, EMSCall[id][ems_pos][0], EMSCall[id][ems_pos][1], EMSCall[id][ems_pos][2], 1);
format(m, sizeof(m), "** %s %s responded to your EMS call, please wait **", fmdranks[PlayerInfo[playerid][pFRank]-1],PlayerICName(playerid));
SendClientMessage(id, COLOR_LIGHTBLUE, m);
SendFactionMessage(FACTION_FMD,0xE4A3E2FF,"[DISPATCH] %s %s accepted EMS call of %s.",fmdranks[PlayerInfo[playerid][pFRank]-1],PlayerICName(playerid),PlayerICName(id));
ShowPlayerFooter(id, "~y~Awaiting for EMS...");
EMSCall[id][ems_acceptedby]=playerid;
return 1;
}
PHP код:
new fmdranks[][][]={
{"Trainee","SAFMD Trainee"},
{"EMT-I","SAFMD EMT-I"},
{"EMT-II","SAFMD EMT-II"},
{"Paramedic","SAFMD Paramedic"},
{"District Chief","SAFMD District Chief"},
{"Chief","SAFMD Chief"}
};