Server Unknown Command
#5

PHP код:
CMD:lock(playeridparams[])
{
    
#pragma unused paramst6
    
new vid GetPlayerVehicleID(playerid);
    new 
model GetVehicleModel(vid);
    new 
string[128];
    new 
Float:XFloat:YFloat:Z;
    
GetPlayerPos(playeridXYZ);
    if(
IsPlayerInAnyVehicle(playerid))
    {
        
GetVehicleParamsEx(videnginelightsalarmdoorsbonnetbootobjective);
        if(
doors == 0)
        {
               
SetVehicleParamsEx(vid,engine,lights,alarm,1,bonnet,boot,objective);
               
format(stringsizeof(string), "* %s presses the button on the door panel, locking the %s. *"pName2(playerid),VehicleNames[model-400]);
            
SendLocalMessage(playeridstring10.0COLOR_PURPLECOLOR_PURPLE);
        }
        else if(
doors == 1)
        {
            
SetVehicleParamsEx(vid,engine,lights,alarm,0,bonnet,boot,objective);
            
format(stringsizeof(string), "* %s presses the button on the door panel, unlocking the %s. *"pName2(playerid),VehicleNames[model-400]);
            
SendLocalMessage(playeridstring10.0COLOR_PURPLECOLOR_PURPLE);
        }
    }
    else
    {
        new 
nearest GetNearestVehicle(playerid15.0);
        new 
models GetVehicleModel(nearest);
        if(
nearest 0)
        {
            
SendClientMessage(playeridCOLOR_WHITE"> Your remote can't reach the vehicle, get closer.");
        }
        else if(
nearest >= 0)
        {
            
GetVehicleParamsEx(nearestenginelightsalarmdoorsbonnetbootobjective);
            if(
doors == 0)
            {
                
format(stringsizeof(string), "* %s takes their keys out, pressing the button, locking the %s. *"pName2(playerid), VehicleNames[models-400]);
                
SendLocalMessage(playeridstring10.0COLOR_PURPLECOLOR_PURPLE);
                
SetVehicleParamsEx(nearest,engine,lights,alarm,1,bonnet,boot,objective);
            }
            else if(
doors == 1)
            {
                
SetVehicleParamsEx(nearest,engine,lights,alarm,0,bonnet,boot,objective);
                
format(stringsizeof(string), "* %s presses the button on the door panel, unlocking the %s. *"pName2(playerid), VehicleNames[models-400]);
                
SendLocalMessage(playeridstring10.0COLOR_PURPLECOLOR_PURPLE);
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Server Unknown Command - by Abreezy - 16.10.2012, 05:20
Re: Server Unknown Command - by BlueGames - 16.10.2012, 05:29
Re: Server Unknown Command - by Abreezy - 16.10.2012, 05:32
AW: Server Unknown Command - by BiosMarcel - 16.10.2012, 05:43
AW: Server Unknown Command - by BiosMarcel - 16.10.2012, 05:46
Re: Server Unknown Command - by Abreezy - 16.10.2012, 05:53
Re: Server Unknown Command - by Abreezy - 16.10.2012, 06:03
AW: Server Unknown Command - by BiosMarcel - 16.10.2012, 06:06
Re: Server Unknown Command - by Randy More - 16.10.2012, 06:08
Re: Server Unknown Command - by Abreezy - 16.10.2012, 06:10

Forum Jump:


Users browsing this thread: 1 Guest(s)