Creating 911 Checkpoints? (PLEASE HELP!!)
#1

Hi guys. I can't frickin figure out how to create checkpoints for EMS, fire, and police. I want it so that if they type /911 they can choose from a list of services, such as PD, FIRE, and EMS. Now I got that part working. But it will NOT make a checkpoint no matter what I do! Please someone help becuz I've just about given up on it. I can't find any filterscripts for it or any tuts on how to do it. DON'T tell me to "Search the forums there's tuts on it" becuz i already have for the past 2 days. There's NOTHIN on it. Just how to make basic checkpoints for races and with preset coordinates. I need this one to get the players position that typed in the command and mark it on the map for fire, ems, or pd whichever they call. Can someone please help? Thank you for any and all help.
Reply
#2

Have you checked out SetPlayerCheckpoint?
Reply
#3

Yes i have. No luck. Doesn't work. If anyone can give me a tutorial on creating something such as this, it would be VERY much appreciated. Well. I'm sure the SetPlayerCheckpoint works but I just haven't gotten it to work for me. I'm not exactly sure WHAT is all involved. I mean I did it the way I thought it should be done but it didn't work.
Reply
#4

If your creating lots of checkpoints i would suggest using Incognitos Streamer Just A Heads Up
Reply
#5

I'm not. I'm not trying to set checkpoints independently. I'm trying to make it to where the player types /911 [Emergency Service] so something like /911 EMS. And then it contacts EMS, informs them that someone needs help, and then marks the player's location with a red marker so EMS knows where to go. See now I've been able to make it so that it DOES let them type /911 ems and it DOES contact EMS and let them know about it. the only thing it DOESN'T do is mark the location. The thing that frustrates me, is that when a player dies... they can hit /service ems and then it will work... I'm trying to make it so the players don't have to die to call EMS so that way the FD can get more RP in rather than waiting for someone to die. So if somone gets in a car accident they can RP it and request fire and EMS to the scene without having to be dead.. u know what I mean?
Reply
#6

Yeah Kindaa i suggest using some variables to fix the waiting for them to die to call EMS etc
Reply
#7

Ya i have been. My code looked like this:

pawn Код:
CMD:911(playerid, params[])
{
    new string[128], choice[32];
    if(sscanf(params, "s[32]", choice))
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /911 [Emergency Service]");
        SendClientMessageEx(playerid, COLOR_GREY, "Available names: Fire Department, EMS, Police, Fire and EMS");
        return 1;
    }

    if(PlayerInfo[playerid][pJailed] > 0)
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
        return 1;
    }

    if(strcmp(choice,"ems",true) == 0)
    {
                new zone[MAX_ZONE_NAME];
                new Test[MAX_PLAYERS];
                new Float:X,Float:Y,Float:Z;
        GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
        SetPVarInt(playerid, "EMSAttempt", 1);
        SendClientMessageEx(playerid, COLOR_WHITE, "The EMS have been informed of your current location       and are on their way.");
        format(string, sizeof(string), "Emergency Dispatch has reported (%d) %s to be wounded at %s, They require immediate emergency transport.",playerid, GetPlayerNameEx(playerid), zone);
        SendRadioMessage(4, TEAM_MED_COLOR, string);
        SendDivisionMessage(12, 3, TEAM_MED_COLOR, string);
                GetPlayerPos(Test, X, Y, Z);
                SetPlayerCheckpoint(Test, X, Y, Z, 5);
        return 1;
    }
         else {
               SendClientMessageEx(playerid, COLOR_WHITE, "Invalid service specified");
               SendClientMessageEx(playerid, COLOR_GREY, "If this is not an emergency please type /service for additional services");
return 1;
}

I know for a fact that's wrong, but that's just a general idea of how I did it. Sorry for the screwed up indentations. That's not how the final product looked lol.
Reply
#8

Anyone?
Reply
#9

Well, you're setting the checkpoint for the same person as from who you get the location. That's something to sort out.
Reply
#10

First at all:Problem with this? -> Test[MAX_PLAYERS]; and (Test, X, Y, Z); What with the Test?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)