Its not setting the waypoint.
#1

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);
            }
        }
Reply
#2

The first thing I don't get is where it actually retrieves the coordinates to make the waypoint.
Reply
#3

Quote:
Originally Posted by Jimmy0wns
View Post
The first thing I don't get is where it actually retrieves the coordinates to make the waypoint.
pawn Code:
SetFactionMarker(playerid, type, color)
{
    foreach (new i : Player) if (GetFactionType(i) == type) {
        SetPlayerMarkerForPlayer(i, playerid, color);
    }
    PlayerData[playerid][pMarker] = 1;
    SetTimerEx("ExpireMarker", 300000, false, "d", playerid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)