Help with a few commands
#2

Problem 1 :

PHP код:
CMD:alock(playeridparams[])
{
    if( 
pInfo[playerid][pAdmin] < )
        return 
0;
    new 
vehicleid;
    if( 
sscanf(params"u"vehicleid ))
        return 
SendUsageErrorplayerid"/alock [Vehicle ID]" );
        
    if(!
IsValidVehicle(vehicleid)) return 1// Check if the veh exist
    
SendClientMessage(playerid0xBF60FFFF"You have locked the doors on this vehicle");
    
    static
        
engine,
        
lights,
        
alarm,
        
doors,
        
bonnet,
        
boot,
        
objective;
    
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
    
SetVehicleParamsEx(vehicleidenginelightsalarm1bonnetbootobjective);
    
    return 
1;

Problem 2 :
PHP код:
new
    
spawnedcar[MAX_VEHICLES];
stock CreateVehicleEx(playeridmodelid)
{
    new
        
world GetPlayerVirtualWorld(playerid),
        
interior GetPlayerInterior(playerid),
        
Float:xFloat:yFloat:zFloat:a,
        
vehicleid;
    
GetPlayerPos(playeridx,y,z);
      
GetPlayerFacingAngle(playerida);
    
vehicleid CreateVehicle(modelidx+3,y,za, -1, -1, -1);
    
spawnedcar[vehicleid] = 1;
    
    
LinkVehicleToInterior(spawnedcarinterior);
    
SetVehicleVirtualWorld(spawnedcarworld);
    
PutPlayerInVehicle(playeridspawnedcar0);
    
SetPlayerInterior(playeridinterior);
    return 
1;
}
if(
spawnedcar[GetPlayerVehicleID(playerid)] != 1)
    return 
Error(playerid"You can only delete spawned vehicles"); 
Reply


Messages In This Thread
Help with a few commands - by FunnyBear - 19.03.2016, 16:23
Re: Help with a few commands - by YouServ - 19.03.2016, 16:48
Re: Help with a few commands - by FunnyBear - 19.03.2016, 17:14
Re: Help with a few commands - by YouServ - 19.03.2016, 17:16
Re: Help with a few commands - by SickAttack - 19.03.2016, 18:16
Re: Help with a few commands - by introzen - 19.03.2016, 18:22
Re: Help with a few commands - by FunnyBear - 20.03.2016, 01:25
Re: Help with a few commands - by SickAttack - 20.03.2016, 01:42

Forum Jump:


Users browsing this thread: 1 Guest(s)