/portamalas e /capo
#1

PHP код:
CMD:portamalas(playeridparams[])
{
    new 
engine,lights,alarm,doors,bonnet,boot,objective;
    new 
carro GetPlayerVehicleID(playerid);
    if(
carro != INVALID_VEHICLE_ID)
    {
        if(
portamalas[playerid] == 0)
        {
            new 
string[256];
            
GetVehicleParamsEx(carro,engine,lights,alarm,doors,bonnet,boot,objective);
              
SetVehicleParamsEx(carro,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
            
portamalas[playerid] = 1;
            
format(stringsizeof(string), "* %s leva sua mгo atй o porta-malas do veнculo, logo abrindo-o."GetName(playerid));
            
ProxDetector(20.0playeridstring,COLOR_PURPLE);
        }
        else if(
portamalas[playerid] == 1)
        {
            new 
string[256];
            
GetVehicleParamsEx(carro,engine,lights,alarm,doors,bonnet,boot,objective);
              
SetVehicleParamsEx(carro,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
            
portamalas[playerid] = 0;
            
format(stringsizeof(string), "* %s leva sua mгo atй o porta-malas do veнculo, logo fechando-o."GetName(playerid));
            
ProxDetector(20.0playeridstring,COLOR_PURPLE);
        }
        if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_RED"[Erro]: Vocк nгo estб prуximo a um veнculo.");
    }
    return 
1;
}
CMD:capo(playeridparams[])
{
    new 
engine,lights,alarm,doors,bonnet,boot,objective;
    new 
carro GetPlayerVehicleID(playerid);
    if(
carro != INVALID_VEHICLE_ID)
    {
        if(
capo[playerid] == 0)
        {
            new 
string[256];
            
GetVehicleParamsEx(carro,engine,lights,alarm,doors,bonnet,boot,objective);
              
SetVehicleParamsEx(carro,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
            
capo[playerid] = 1;
            
format(stringsizeof(string), "* %s leva sua mгo atй o capo do veнculo, logo abrindo-o."GetName(playerid));
            
ProxDetector(20.0playeridstring,COLOR_PURPLE);
        }
        else if(
capo[playerid] == 1)
        {
            new 
string[256];
            
GetVehicleParamsEx(carro,engine,lights,alarm,doors,bonnet,boot,objective);
              
SetVehicleParamsEx(carro,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
            
capo[playerid] = 0;
            
format(stringsizeof(string), "* %s leva sua mгo atй o capo do veнculo, logo fechando-o."GetName(playerid));
            
ProxDetector(20.0playeridstring,COLOR_PURPLE);
        }
        if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_RED"[Erro]: Vocк nгo estб prуximo a um veнculo.");
    }
    return 
1;

Eu gostaria colocar, para que ele pode-se utilizar o comando somente a frente do carro/atrбs do carro.
Reply


Messages In This Thread
/portamalas e /capo - by FernandoDutra - 20.12.2015, 23:42
Re: /portamalas e /capo - by rol3Play - 20.12.2015, 23:49
Re: /portamalas e /capo - by FernandoDutra - 20.12.2015, 23:50
Re: /portamalas e /capo - by FernandoDutra - 20.12.2015, 23:53
Re: /portamalas e /capo - by FernandoDutra - 21.12.2015, 00:16

Forum Jump:


Users browsing this thread: 1 Guest(s)