Won't create a player marker or put phone away.
#1

pawn Код:
if(number == 111)
    {
        format(string, sizeof(string), "* %s takes out their cellphone, pressing a few numbers *", GetNameEx(playerid));
        ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
        SetPlayerAttachedObject(playerid, 0, 330 , 6);
        BeingCalled[playerid] = 1;
        SendClientMessage(playerid, COLOUR_GREY, "Connecting......");
        new am;
        foreach(Player, i)
        {
            if(TaxiDuty[i] == 1)
            {
                am ++;
            }
        }
        if(am == 0)
        {
            SendClientMessage(playerid, COLOUR_WHITE, "'I'm really sorry, there are no taxis available at the moment.'");
            BeingCalled[playerid] = -1;
            SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
            RemovePlayerAttachedObject(playerid, 0);
            ClearAnimations(playerid);
        }
        if(am > 0)
        {
            SendClientMessage(playerid, COLOUR_YELLOW, "'A taxi has been dispatched to your location, thank you for calling!'");
            BeingCalled[playerid] = -1;
            SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
            RemovePlayerAttachedObject(playerid, 0);
            ClearAnimations(playerid);
            foreach(Player, i)
            {
                if(TaxiDuty[i] == 1)
                {
                new zone[MAX_ZONE_NAME];
                    GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
                    format(string, sizeof(string), "%s is requesting a taxi at %s, please make your way to                  their location.", GetNameEx(playerid), zone);
                SendClientMessage(i, COLOUR_YELLOW, string);
                    SetPlayerMarkerForPlayer(playerid, i, COLOUR_YELLOW);
                }
               }
        }
    }
It delivers the client message but doesn't set the player marker for the player, it also doesn't stop the cellphone being shown, it gets the correct location.
Reply


Messages In This Thread
Won't create a player marker or put phone away. - by Dokins - 09.06.2016, 23:20
Re: Won't create a player marker or put phone away. - by StaticYey - 10.06.2016, 00:09
Re: Won't create a player marker or put phone away. - by Dokins - 10.06.2016, 00:21
Re: Won't create a player marker or put phone away. - by Vince - 10.06.2016, 08:43

Forum Jump:


Users browsing this thread: 2 Guest(s)