911 Call problem / Marker point
#2

Quote:
Originally Posted by Kethrios
Посмотреть сообщение
Hello everybody.

I post here because I've some problems with my 911 calls.
When someone call the police, the police get the message, but they don't have the checkpoint, here is the code :

pawn Код:
public cops_callCopsUrgence(playerid, raison[])
{
    if(cop_nbrCops <= 0)
        { SendClientMessage(playerid, COLOR_TEL, "[911: Police] No cops are available  !"); return 1; }

    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    format(proxy_msg, sizeof(proxy_msg), "%s call the police.", playername);
    proxy_sendMsg(playerid, proxy_msg);
    SendClientMessage(playerid,COLOR_TEL,"[911: Police] Don't move !");
    SetTimerEx("resetCallUrgence",120000,false,"d",playerid);
    PlayerInfo[playerid][pUseSpecialColor] = 1;
    print("Lancement Boucle 179");
    for(new i=MIN_PLAYERID; i<MAX_PLAYERS_CURRENT+1; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pMember]== FACT_COPS_LS && OnDuty[i])
        {
            SetPlayerMarkerForPlayer(i, playerid, COLOR_ALERT);
            new stringappel[MAX_STRING_MSG];
            SendClientMessage(i ,COLOR_ALERT,"===========================================================================");
            SendClientMessage(i, COLOR_BLUE, "DISPATCH AUTOMATIQUE DU CENTRE DE TRAITEMENT DE L'ALERTE");
            SendClientMessage(i, COLOR_BLUE, "Nature : Appel d'urgence 'Police secours'.");
            format(stringappel,sizeof(stringappel),"From : %s \n Reason : %s",playername,raison);
            SendClientMessage(i, COLOR_ALERT,stringappel);
            SendClientMessage(i, COLOR_BLUE, "");
            SendClientMessage(i, COLOR_BLUE, "");
            SendClientMessage(i, COLOR_ALERT, "[C.T.A.] Action prioritaire : Envoie d'une PV sur les lieux.");
            SendClientMessage(i, COLOR_ALERT, "[C.T.A.] Action demandйe : Attente des ordres des supйrieurs.");
            SendClientMessage(i, COLOR_ALERT, "[C.T.A.] Que les unitйs а proximitй se rapprochent de la zone, en attente.");
            SendClientMessage(i ,COLOR_ALERT,"===========================================================================");
            SendClientMessage(i, COLOR_SERVER, "[INFO] A checkpoint has been set on your GPS, go !");
        }
    }
    print("Fin Boucle 179");
    return 1;
}





And I have the same problem with the medic code, it says that there is no medic online too, even if i'm on duty.


pawn Код:
public medic_callMedicUrgence(playerid, raison[])
{
    if(Medics <= 0)
        { SendClientMessage(playerid, COLOR_TEL, "[911: LAFMD] No medics are available !"); return 1; }

    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    format(proxy_msg, sizeof(proxy_msg), "%s calls the medical department.", playername);
    proxy_sendMsg(playerid, proxy_msg);
    SendClientMessage(playerid,COLOR_TEL,"[C.T.A.] An ambulance is coming.");
    SendClientMessage(playerid,COLOR_TEL,"[C.T.A.] They hanged up...");
    SendClientMessage(playerid,COLOR_SERVER,"[INFO] Stay here, an ambulance is coming.");

    medic_needMedic[playerid] = true;
    SetTimerEx("resetCallUrgence",120000,false,"d",playerid);
    PlayerInfo[playerid][pUseSpecialColor] = 1;
    print("Lancement Boucle 178");
    for(new i=MIN_PLAYERID; i<MAX_PLAYERS_CURRENT+1; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pMember]== FACT_LAFMD)
        {
            SetPlayerMarkerForPlayer(i, playerid, COLOR_ALERT);
            new stringappel[MAX_STRING_MSG];
            SendClientMessage(i ,COLOR_ALERT,"====================================================================");
            SendClientMessage(i, COLOR_BLUE, "DISPATCH AUTOMATIQUE DU CENTRE DE TRAITEMENT DE L'ALERTE");
            SendClientMessage(i, COLOR_BLUE, "Nature : Appel d'urgence.");
            format(stringappel,sizeof(stringappel),"FROM : %s \n REASON : %s",playername,raison);
            SendClientMessage(i, COLOR_ALERT,stringappel);
            SendClientMessage(i, COLOR_BLUE, "");
            SendClientMessage(i, COLOR_BLUE, "");
            SendClientMessage(i, COLOR_ALERT, "[C.T.A.] Action prioritaire : Envoyez les secours appropriйs.");
            SendClientMessage(i, COLOR_ALERT, "[C.T.A.] Action demandйe : Attente des ordres des supйrieurs.");
            SendClientMessage(i, COLOR_ALERT, "[C.T.A.] En cas de problиmes, demandez l'intervention de la police.");
            SendClientMessage(i ,COLOR_ALERT,"====================================================================");
            SendClientMessage(i, COLOR_SERVER, "[INFO] A checkpoint has been set on your GPS, go !");
        }
    }
    print("Fin Boucle 178");
    return 1;
}


Can you please help me with this marker thing please ?
PHP код:
public cops_callCopsUrgence(playeridraison[])
{
    if(
cop_nbrCops <= 0)return SendClientMessage(playeridCOLOR_TEL"[911: Police] No cops are available  !");
    new 
playername[MAX_PLAYER_NAME];
    
GetPlayerName(playeridplayernamesizeof(playername));
    
format(proxy_msgsizeof(proxy_msg), "%s call the police."playername);
    
proxy_sendMsg(playeridproxy_msg);
    
SendClientMessage(playerid,COLOR_TEL,"[911: Police] Don't move !");
    
SetTimerEx("resetCallUrgence",120000,false,"d",playerid);
    
PlayerInfo[playerid][pUseSpecialColor] = 1;
    print(
"Lancement Boucle 179");
    for(new 
ii<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && PlayerInfo[i][pMember]== FACT_COPS_LS && OnDuty[i])
        {
            
SetPlayerMarkerForPlayer(iplayeridCOLOR_ALERT);
            new 
stringappel[MAX_STRING_MSG];
            
SendClientMessage(,COLOR_ALERT,"===========================================================================");
            
SendClientMessage(iCOLOR_BLUE"DISPATCH AUTOMATIQUE DU CENTRE DE TRAITEMENT DE L'ALERTE");
            
SendClientMessage(iCOLOR_BLUE"Nature : Appel d'urgence 'Police secours'.");
            
format(stringappel,sizeof(stringappel),"From : %s \n Reason : %s",playername,raison);
            
SendClientMessage(iCOLOR_ALERT,stringappel);
            
SendClientMessage(iCOLOR_BLUE"");
            
SendClientMessage(iCOLOR_BLUE"");
            
SendClientMessage(iCOLOR_ALERT"[C.T.A.] Action prioritaire : Envoie d'une PV sur les lieux.");
            
SendClientMessage(iCOLOR_ALERT"[C.T.A.] Action demandйe : Attente des ordres des supйrieurs.");
            
SendClientMessage(iCOLOR_ALERT"[C.T.A.] Que les unitйs а proximitй se rapprochent de la zone, en attente.");
            
SendClientMessage(,COLOR_ALERT,"===========================================================================");
            
SendClientMessage(iCOLOR_SERVER"[INFO] A checkpoint has been set on your GPS, go !");
        }
    }
    print(
"Fin Boucle 179");
    return 
1;

your problem is
PHP код:
for(new i=MIN_PLAYERIDi<MAX_PLAYERS_CURRENT+1i++) 
you don't loop by everyone
and i don't know which number is behind this two values
Reply


Messages In This Thread
911 Call problem / Marker point - by Kethrios - 16.01.2013, 13:38
AW: 911 Call problem / Marker point - by IPrototypeI - 16.01.2013, 15:32
Re : 911 Call problem / Marker point - by Kethrios - 16.01.2013, 15:49
AW: Re : 911 Call problem / Marker point - by IPrototypeI - 16.01.2013, 17:18
Re : 911 Call problem / Marker point - by Kethrios - 16.01.2013, 19:27
Re : 911 Call problem / Marker point - by Kethrios - 17.01.2013, 13:18

Forum Jump:


Users browsing this thread: 1 Guest(s)