Server Unknown Command
#1

Fixed.
Reply
#2

You have any "GetVehicleParamsEx" stock?
Reply
#3

No, why would I? It's already included:

https://sampwiki.blast.hk/wiki/GetVehicleParamsEx
Reply
#4

delete this Message
Reply
#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
#6

Still the same issue.
Reply
#7

With the use of

PHP код:
if(nearest 0
        { 
            
SendClientMessage(playeridCOLOR_WHITE"> Your remote can't reach the vehicle, get closer."); 
        } 
It still gives me the issue I originally had.
Reply
#8

Now ?

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
#9

Not sure if this is the issue, but try instead of having..

pawn Код:
if(nearest == 0)
having..

pawn Код:
if(nearest == INVALID_VEHICLE_ID) // Since 0 is not the invalid ID for the vehicles.
Reply
#10

Still the same issue.

Edit: Trying above.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)