Car Health[Problem]
#1

Help i made a thingy..but doesent work..if vehicle health is smaller than 300 and then car stops and after the stop i can start engine then engine stops then i statr it..i doesent work..

PHP код:
public CheckCarHealth()
                {
                new 
string[128];
                new 
sendername[MAX_PLAYER_NAME];
                for (new 
i=0MAX_PLAYERSi++)
                {
                if (
IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
                {
                new 
Float:health;
                
GetVehicleHealth(GetPlayerVehicleID(i),health);
                new 
newcar GetPlayerVehicleID(i);
    if (
health <= 300 && !IsModelABoat(newcar) && !IsModelABike(newcar) && !IsModelAPlane(newcar) && !IsASweeper(newcar))
                {
                 if(
engineOn[GetPlayerVehicleID(i)] == 1)
                 {
                    if(
GetPlayerState(i) == PLAYER_STATE_DRIVER)
                    {
                        
TogglePlayerControllable(i0);
                         
SendClientMessage(iCOLOR_GREY"Motorul sa stricat,poti suna mecanicul!");
                          
engineOn[GetPlayerVehicleID(i)] = false;
                           
GetPlayerName(isendernamesizeof(sendername));
                         
format(stringsizeof(string), "* Motorul sa stricat! (( %s ))"sendername);
                        
ProxDetector(30.0istringCOLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                    }
                 }
                }
                }
                }
                } 
Reply


Messages In This Thread
Car Health[Problem] - by Dan_Barocu - 27.04.2012, 11:48
Re: Car Health[Problem] - by antonio112 - 27.04.2012, 12:18
Re: Car Health[Problem] - by milanosie - 27.04.2012, 12:21
Re: Car Health[Problem] - by Dan_Barocu - 27.04.2012, 12:45
Re: Car Health[Problem] - by Dan_Barocu - 27.04.2012, 12:47
Re: Car Health[Problem] - by zbt - 27.04.2012, 13:50
Re: Car Health[Problem] - by Dan_Barocu - 27.04.2012, 14:15
Re: Car Health[Problem] - by Dan_Barocu - 27.04.2012, 14:44
Re: Car Health[Problem] - by zbt - 27.04.2012, 15:47

Forum Jump:


Users browsing this thread: 3 Guest(s)