Car commands help
#7

Quote:
Originally Posted by Lido
Посмотреть сообщение
PHP код:
command(carplayeridparams[]) 

    if(
isnull(params)) 
    { 
        
SendClientMessage(playeridWHITE"SYTNAX: /car [usage]"); 
        
SendClientMessage(playeridWHITE"USAGES: hood, lights, trunk."); 
    } 
    else 
    { 
        new 
closestid GetClosestCar(playerid5); 
        new 
vehicleid GetPlayerVehicleID(playerid); 
        new 
Float:xFloat:yFloat:z
        new 
enginelightsalarmdoorsbonnetbootobjective
       
        new 
string[256]; 
        
GetVehicleParamsEx(closestidengine,lights,alarm,doors,bonnetboot,objective); 
        
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective); 
        
GetVehiclePos(vehicleidxyz); 
        if(
IsPlayerInRangeOfPoint(playerid5xyz-3)) 
        { 
            if(
strcmp(params"hood"true) == 0
            { 
                if(
Vehicles[closestid][Hood] == 0
                { 
                    
Vehicles[closestid][Hood] = 1
                    
format(string256"* %s opens the hood of their vehicle."GetName(playerid)); 
                    
NearByMessage(playeridPURPLEstring); 
                    
SetVehicleParamsEx(closestidenginelightsalarmdoors1bootobjective); 
                } 
                else if(
Vehicles[closestid][Hood] == 1
                { 
                    
Vehicles[closestid][Hood] = 0
                    
format(string256"* %s closes the hood of their vehicle."GetName(playerid)); 
                    
NearByMessage(playeridPURPLEstring); 
                    
SetVehicleParamsEx(closestidenginelightsalarmdoors0bootobjective); 
                } 
            } 
        } 
        if(
IsPlayerInRangeOfPoint(playerid5xyz+3)) 
        { 
            if(
strcmp(params"trunk"true) == 0
            { 
                if(
Vehicles[closestid][Trunk] == 0
                { 
                    
Vehicles[closestid][Trunk] = 1
                    
format(string256"* %s extends his right arm towards the trunk, opening the trunk of their vehicle."GetName(playerid)); 
                    
NearByMessage(playeridPURPLEstring); 
                    
SetVehicleParamsEx(closestidenginelightsalarmdoorsbonnet1objective); 
                } 
                else if(
Vehicles[closestid][Trunk] == 1
                { 
                    
Vehicles[closestid][Trunk] = 0
                    
format(string256"* %s closes the hood of their vehicle."GetName(playerid)); 
                    
NearByMessage(playeridPURPLEstring); 
                    
SetVehicleParamsEx(closestidenginelightsalarmdoorsbonnet0objective); 
                } 
            } 
        } 
    } 
Thank you
Reply


Messages In This Thread
Car commands help - by arko123 - 07.10.2012, 08:04
Re: Car commands help - by ~Pawno~ - 07.10.2012, 08:06
Re: Car commands help - by arko123 - 07.10.2012, 08:10
Re: Car commands help - by Smally - 07.10.2012, 08:16
Re: Car commands help - by arko123 - 07.10.2012, 08:31
Re: Car commands help - by Smally - 07.10.2012, 08:39
Re: Car commands help - by arko123 - 07.10.2012, 08:42
Re: Car commands help - by Smally - 07.10.2012, 08:45
Re: Car commands help - by arko123 - 07.10.2012, 14:15

Forum Jump:


Users browsing this thread: 1 Guest(s)