16.02.2015, 22:10
Hello, i've an issue, when someone calls the medics or police its not setting the waypoint,
pawn Code:
switch (PlayerData[playerid][pEmergency])
{
case 1:
{
if (!strcmp(text, "police", true))
{
PlayerData[playerid][pEmergency] = 2;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "[OPERATOR]:{FFFFFF} You've been dispatched to police HQ. Please describe the crime.");
}
else if (!strcmp(text, "medics", true))
{
PlayerData[playerid][pEmergency] = 3;
SendClientMessage(playerid, COLOR_HOSPITAL, "[OPERATOR]:{FFFFFF} You've been dispatched to medical HQ. Please describe the emergency.");
}
else SendClientMessage(playerid, COLOR_LIGHTBLUE, "[OPERATOR]:{FFFFFF} Sorry, I don't understand. Do you require \"police\" or \"medics\"?");
}
case 2:
{
SendFactionMessageEx(FACTION_POLICE, COLOR_RADIO, "911 CALL: %s (%s)", ReturnName(playerid, 0), GetPlayerLocation(playerid));
SendFactionMessageEx(FACTION_POLICE, COLOR_RADIO, "DESCRIPTION: %s", text);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "[OPERATOR]:{FFFFFF} We have alerted all units in the area.");
cmd_hangup(playerid, "\1");
SetFactionMarker(playerid, FACTION_POLICE, 0x00D700FF);
}
case 3:
{
SendFactionMessageEx(FACTION_MEDIC, COLOR_HOSPITAL, "911 CALL: %s (%s)", ReturnName(playerid, 0), GetPlayerLocation(playerid));
SendFactionMessageEx(FACTION_MEDIC, COLOR_HOSPITAL, "DESCRIPTION: %s", text);
SendClientMessage(playerid, COLOR_HOSPITAL, "[OPERATOR]:{FFFFFF} We have alerted all units in the area.");
cmd_hangup(playerid, "\1");
SetFactionMarker(playerid, FACTION_MEDIC, 0x00D700FF);
}
}