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;
}
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;
}
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 Код:
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 Код:
Can you please help me with this marker thing please ? |
public cops_callCopsUrgence(playerid, raison[])
{
if(cop_nbrCops <= 0)return SendClientMessage(playerid, COLOR_TEL, "[911: Police] No cops are available !");
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; i<MAX_PLAYERS; 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;
}
for(new i=MIN_PLAYERID; i<MAX_PLAYERS_CURRENT+1; i++)
#define MIN_PLAYERID 0
new MAX_PLAYERS_CURRENT = 0;
This is the 1st user ID possible
pawn Код:
pawn Код:
Thanks for answering. |
for(new i; i < MAX_PLAYERS; i++){
}
for(; i < MAX_PLAYERS; i++){
#undef MAX_PLAYERS
#define MAX_PLAYERS 100
#define MIN_PLAYERID 0
new MAX_PLAYERS_CURRENT = 0;
for(; i < 0; i++){
for(new i=0;i<MAX_PLAYERS;i++)