Command not working perfectly
#6

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
Yeah format the text, forgot about it.

Well then your check returns false, no one called or you didn't set the variable ems_called to true after a player calling.
I have done this,
PHP код:
CMD:callems(playerid,params[]){
    if(
PlayerInfo[playerid][pInjured] != 1) return SendClientMessage(playeridCOLOR_RED"Error:{FFFFFF} This command can be used only when you are injured.");
    if(
EMSCall[playerid][ems_called]) return SendClientMessage(playeridCOLOR_GREY"You already called for EMS service, please wait...");
    
GetPlayerPos(playeridEMSCall[playerid][ems_pos][0], EMSCall[playerid][ems_pos][1], EMSCall[playerid][ems_pos][2]);
    if(
EMSCall[playerid][ems_pos][0]==0.0000 && EMSCall[playerid][ems_pos][1]==0.0000&&EMSCall[playerid][ems_pos][2]==0.0000){
        
EMSCall[playerid][ems_pos][0] = PlayerInfo[playerid][pPosX];
        
EMSCall[playerid][ems_pos][1] = PlayerInfo[playerid][pPosY];
        
EMSCall[playerid][ems_pos][2] = PlayerInfo[playerid][pPosZ];
    }
    
EMSCall[playerid][ems_called]=1;
    
SendFactionMessage(FACTION_FMD,0xE4A3E2FF,"[DISPATCH] %s is calling EMS at %s. (( Use /emscalls to list calls, /acceptcall to accept call. ))",PlayerICName(playerid),GetPlayerZone(playerid));
    return 
1;

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: 3 Guest(s)