Hide MapIcon problem
#1

I have problem ... I mark wplayer to go somewhere and he must follow MapIcon 51 (Truck) but i cant hide the icon
Scroll DOWN TO SEE TH PROBLEM I HAVE MADE A NEW {pawn} {/pawn} for it
pawn Код:
//IF PLAYER ENTER VEHICLE

if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER){

    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 596 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 597 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 598 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 599 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 497 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 523 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 427){
        if(gTeam[playerid]  != POLICE_TEAM)
        {
                TogglePlayerControllable(playerid, 0);
                SendClientMessage(playerid, lime , "You don't have the keys for this vehicle!");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
        }
        }

    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 511 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 513 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 593){
        if(gTeam[playerid]  == PILOT_TEAM)
        {
            //----------------------------------------------------
            if(IsPlayerInRangeOfPoint(playerid,700.0,-1297.2119,-164.6497,15.5337)){//SF TO
            DeliveringFrom[playerid] = SF;
            switch(random(3))
            {
            case 0:{//LS
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,LS,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 1898.9993,-2417.9692,14.9136, 51, 0, MAPICON_GLOBAL);//LS ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Los Santos airport or just follow the truck on your minimap!");
            }
            case 1:{//LV
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,LV,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 1335.9935,1328.2511,12.1963, 51, 0, MAPICON_GLOBAL);//LV ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Las Venturas airport or just follow the truck on your minimap!");
            }
            case 2:{//VM
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,VM,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 383.9507,2540.7974,17.9126, 51, 0, MAPICON_GLOBAL);//VM ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Verdant Meadows airport or just follow the truck on your minimap!");
            }
            }
            }
            //-----------------------------------------------------------------------
            if(IsPlayerInRangeOfPoint(playerid,500.0,245.7969,2510.0178,17.9284)){//VM TO
            DeliveringFrom[playerid] = VM;
            switch(random(3))
            {
            case 0:{//LS
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,LS,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 1898.9993,-2417.9692,14.9136, 51, 0, MAPICON_GLOBAL);//LS ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Los Santos airport or just follow the truck on your minimap!");
            }
            case 1:{//LV
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,LV,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 1335.9935,1328.2511,12.1963, 51, 0, MAPICON_GLOBAL);//LV ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Las Venturas airport or just follow the truck on your minimap!");
            }
            case 2:{//SF
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,SF,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, -1683.3993,-284.9818,15.5228, 51, 0, MAPICON_GLOBAL);//SF ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to San Fierro airport or just follow the truck on your minimap!");
            }
            }
            }
            //-------------------------------------------
            if(IsPlayerInRangeOfPoint(playerid,700.0,1433.4644,1463.8917,12.1948)){//LV TO
            DeliveringFrom[playerid] = LV;
            switch(random(3))
            {
            case 0:{//LS
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,LS,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 1898.9993,-2417.9692,14.9136, 51, 0, MAPICON_GLOBAL);//LS ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Los Santos airport or just follow the truck on your minimap!");
            }
            case 1:{//VM
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,VM,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 383.9507,2540.7974,17.9126, 51, 0, MAPICON_GLOBAL);//LV ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Verdant Meadows airport or just follow the truck on your minimap!");
            }
            case 2:{//SF
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,SF,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, -1683.3993,-284.9818,15.5228, 51, 0, MAPICON_GLOBAL);//SF ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to San Fierro airport or just follow the truck on your minimap!");
            }
            }
            }
            //-------------------------------------------------------
            if(IsPlayerInRangeOfPoint(playerid,500.0,1812.9712,-2538.5164,14.9491)){//LS TO
            DeliveringFrom[playerid] = LS;
            switch(random(3))
            {
            case 0:{//LV
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,LS,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 1898.9993,-2417.9692,14.9136, 51, 0, MAPICON_GLOBAL);//LS ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Las Venturas airport or just follow the truck on your minimap!");
            }
            case 1:{//VM
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,VM,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, 383.9507,2540.7974,17.9126, 51, 0, MAPICON_GLOBAL);//LV ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to Verdant Meadows airport or just follow the truck on your minimap!");
            }
            case 2:{//SF
            HideAllJobsCheckpoints(playerid);
            ShowPlayerCheckpoint(playerid,SF,bool:false);
            RemovePlayerMapIcon(playerid, 99);
            SetPlayerMapIcon(playerid, 99, -1683.3993,-284.9818,15.5228, 51, 0, MAPICON_GLOBAL);//SF ICON
            SendClientMessage(playerid,yellow,"Deleiver the goods to San Fierro airport or just follow the truck on your minimap!");
            }
            }
            }
            //------------------------------------------------
           
           
        }
        else{
                TogglePlayerControllable(playerid, 0);
                SendClientMessage(playerid, lime , "You don't know how to drive this vehicle!");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
        }

    }






// RENTABLE BIKES
    if(!IsItRentingBike[playerid]){
   
        if(GetPlayerVehicleID(playerid) == rentable_bike[1] || GetPlayerVehicleID(playerid) == rentable_bike[2] || GetPlayerVehicleID(playerid) == rentable_bike[3] || GetPlayerVehicleID(playerid) == rentable_bike[4] || GetPlayerVehicleID(playerid) == rentable_bike[5] || GetPlayerVehicleID(playerid) == rentable_bike[6] || GetPlayerVehicleID(playerid) == rentable_bike[7]){
        CenterText(playerid, "This is a rentable bike.~n~To rent press Y.~n~To cancel press N.~n~Price:300$",999*60);
        TogglePlayerControllable(playerid, 0);
        }
    }else{
    if(RentedBike[playerid] != GetPlayerVehicleID(playerid)){
    if(GetPlayerVehicleID(playerid) == rentable_bike[1] || GetPlayerVehicleID(playerid) == rentable_bike[2] || GetPlayerVehicleID(playerid) == rentable_bike[3] || GetPlayerVehicleID(playerid) == rentable_bike[4] || GetPlayerVehicleID(playerid) == rentable_bike[5] || GetPlayerVehicleID(playerid) == rentable_bike[6] || GetPlayerVehicleID(playerid) == rentable_bike[7]){
    TogglePlayerControllable(playerid, 0);
    CenterText(playerid,"You are already renting a bike!", 5);
    RemovePlayerFromVehicle(playerid);
    TogglePlayerControllable(playerid, 1);
    }
    }else{
    KillTimer(UnRentBikeTimer);
    }
    }
    }
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT){
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 511 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 513 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 593){
        if(gTeam[playerid]  == PILOT_TEAM)
        {

        HideAllAirportsCheckpoints(playerid);
HERE:
pawn Код:
RemovePlayerMapIcon(playerid, 99);
Countinious:
pawn Код:
}
  }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)