Thread: [FilterScript] Deer Hunter Job
View Single Post
Old 10/07/2018, 04:25 PM   #2
CodeStyle175
Banned
 
Join Date: Apr 2014
Posts: 455
Reputation: 35
Default Re: Deer Hunter Job

again wtf is this shit?
why are you repeating useless code liks this?
PHP Code:
     if(PRESSED(KEY_WALK)) {
        if(
Deep_Deer[playerid] == 1) {
            if(
IsPlayerInRangeOfPoint(playerid3.52046.7698, -799.4532126.7188) && Deer[playerid] == 1) {
                
TogglePlayerControllable(playerid0);
                
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.1111110);
                
Deep_Deer[playerid] = 0;
                
KillTimer(Meeters_BTWDeer[playerid]);
                
Shoot_Deer[playerid] = 0;
                
SetTimer("Done_Deer"3500false);
            }else if(
IsPlayerInRangeOfPoint(playerid3.52021.1818, -494.020776.1904) && Deer[playerid] == 2) {
                
TogglePlayerControllable(playerid0);
                
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.1111110);
                
Deep_Deer[playerid] = 0;
                
KillTimer(Meeters_BTWDeer[playerid]);
                
Shoot_Deer[playerid] = 0;
                
SetTimer("Done_Deer"3500false);
            }else if(
IsPlayerInRangeOfPoint(playerid3.51632.5769, -599.744461.8233) && Deer[playerid] == 3) {
                
TogglePlayerControllable(playerid0);
                
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.1111110);
                
Deep_Deer[playerid] = 0;
                
KillTimer(Meeters_BTWDeer[playerid]);
                
Shoot_Deer[playerid] = 0;
                
SetTimer("Done_Deer"3500false);
            }else if(
IsPlayerInRangeOfPoint(playerid3.51741.4386, -979.581736.6115) && Deer[playerid] == 4) {
                
TogglePlayerControllable(playerid0);
                
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.1111110);
                
Deep_Deer[playerid] = 0;
                
KillTimer(Meeters_BTWDeer[playerid]);
                
Shoot_Deer[playerid] = 0;
                
SetTimer("Done_Deer"3500false);
            }else if(
IsPlayerInRangeOfPoint(playerid3.52553.6780, -963.433881.6685) && Deer[playerid] == 5) {
                
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.1111110);
                
TogglePlayerControllable(playerid0);
                
Deep_Deer[playerid] = 0;
                
KillTimer(Meeters_BTWDeer[playerid]);
                
Shoot_Deer[playerid] = 0;
                
SetTimer("Done_Deer"3500false);
            }else if(
IsPlayerInRangeOfPoint(playerid3.52637.4963, -380.219557.9261) && Deer[playerid] == 6) {
                
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.1111110);
                
TogglePlayerControllable(playerid0);
                
Deep_Deer[playerid] = 0;
                
KillTimer(Meeters_BTWDeer[playerid]);
                
Shoot_Deer[playerid] = 0;
                
SetTimer("Done_Deer"3500false);
            }else if(
IsPlayerInRangeOfPoint(playerid3.52406.9773, -403.468172.1762) && Deer[playerid] == 7) {
                
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.1111110);
                
TogglePlayerControllable(playerid0);
                
Deep_Deer[playerid] = 0;
                
KillTimer(Meeters_BTWDeer[playerid]);
                
Shoot_Deer[playerid] = 0;
                
SetTimer("Done_Deer"3500false);
            }
         }
     } 
can be done this
PHP Code:
if(Deep_Deer[playerid] == 1) {
        if(
IsPlayerInRangeOfPoint(playerid3.52046.7698, -799.4532126.7188) && Deer[playerid] == || 
        
IsPlayerInRangeOfPoint(playerid3.52021.1818, -494.020776.1904) && Deer[playerid] == ||
        
IsPlayerInRangeOfPoint(playerid3.51632.5769, -599.744461.8233) && Deer[playerid] == ||
        
IsPlayerInRangeOfPoint(playerid3.51741.4386, -979.581736.6115) && Deer[playerid] == ||
        
IsPlayerInRangeOfPoint(playerid3.52553.6780, -963.433881.6685) && Deer[playerid] == ||
        
IsPlayerInRangeOfPoint(playerid3.52637.4963, -380.219557.9261) && Deer[playerid] == ||
        
IsPlayerInRangeOfPoint(playerid3.52406.9773, -403.468172.1762) && Deer[playerid] == 7){
            
TogglePlayerControllable(playerid0);
            
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.1111110);
            
Deep_Deer[playerid] = 0;
            
KillTimer(Meeters_BTWDeer[playerid]);
            
Shoot_Deer[playerid] = 0;
            
SetTimer("Done_Deer"3500false);
        }
    } 
CodeStyle175 is offline   Reply With Quote