Command not working perfectly
#1

It's not showing available ems calls
PHP код:
CMD:emscalls(playerid,params[]){
    if(
PlayerInfo[playerid][pFaction]!=FACTION_FMD)return SendClientMessage(playeridCOLOR_GREY"You are not authorized to use this command.");
    
SendClientMessage(playeridCOLOR_WHITE"________________| Available EMS Calls |_________________");
    new 
m[512],line[512];
    for(new 
i=0;i<MAX_PLAYERS;i++){
        if(
EMSCall[i][ems_called]){
            
format(msizeof(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(mlinesizeof(line));
        }
    }
    
SendClientMessage(playerid0xE4A3E2FFline);
    return 
1;

Another scripting problem is in name,

Код:
[13:19:48] [DISPATCH] р Trainee Akib Khan accepted EMS call of .

[13:19:49] ** You arrived at the scene **
р < This sybmol

Code:
PHP код:
CMD:acceptcall(playerid,params[]){
    if(
PlayerInfo[playerid][pFaction]!=FACTION_FMD)return SendClientMessage(playeridCOLOR_GREY"You are not authorized to use this command.");
    new 
id,m[512];
    if(
sscanf(params"i"id)) return SendClientMessage(playeridCOLOR_GREY"Usage:{FFFFFF} /acceptcall [ID], use /emscalls to see available calls and their id.");
    if(!
EMSCall[id][ems_called]) return SendClientMessage(playeridCOLOR_RED"Error:{FFFFFF} This player not called for EMS.");
    if(
EMSCall[id][ems_acceptedby]) return SendClientMessage(playeridCOLOR_GREY"Someone already accepted this call.");
    
DisablePlayerCheckpoint(playerid);
    
SetPlayerCheckpoint(playeridEMSCall[id][ems_pos][0], EMSCall[id][ems_pos][1], EMSCall[id][ems_pos][2], 1);
    
format(msizeof(m), "** %s %s responded to your EMS call, please wait **"fmdranks[PlayerInfo[playerid][pFRank]-1],PlayerICName(playerid));
    
SendClientMessage(idCOLOR_LIGHTBLUEm);
    
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;

Thats the fmdranks variable
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"}
}; 
Reply


Messages In This Thread
Command not working perfectly - by akib - 05.03.2019, 06:17
Re: Command not working perfectly - by akib - 05.03.2019, 06:56
Re: Command not working perfectly - by TheToretto - 05.03.2019, 08:02
Re: Command not working perfectly - by akib - 05.03.2019, 09:58
Re: Command not working perfectly - by TheToretto - 05.03.2019, 10:08
Re: Command not working perfectly - by akib - 05.03.2019, 10:18
Re: Command not working perfectly - by TheToretto - 05.03.2019, 10:48
Re: Command not working perfectly - by akib - 05.03.2019, 11:35
Re: Command not working perfectly - by TheToretto - 05.03.2019, 11:40

Forum Jump:


Users browsing this thread: 2 Guest(s)