Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Command(s) not working

$
0
0
PHP Code:

CMD:siren(playeridparams[])
{
    new 
model GetVehicleModel(vehicle);
    if(!
IsLawEnforcement(playerid)) return SCM(playeridCOLOR_LIGHTRED"Invalid faction.");
    if(!
IsDriver(playerid)) return SCM(playeridCOLOR_GREY"You must be the driver.");
    {
        if(
model != 560 && model != 541 && model != 525 && model != 426 && model != 579) return SCM(playeridCOLOR_GREY"The siren is compatible only for Sultan/Bullet/Towtruck/Premier/Huntley.");
        if(!
IsDriver(playerid)) return SCM(playeridCOLOR_GREY"You must be the driver.");
        if(
Siren[vehicle] == 0)
        {
            
SCM(playeridCOLOR_WHITE"Siren attached.");
            if(
model == 560)
            {
                
Siren[vehicle] = CreateDynamicObject(186460.00.00.00.00.00.0, -1, -1, -1300.0);
                
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle0.225000,0.750000,0.4499990.0000000.0000000.000000);
            }
            if(
model == 541)
            {
                
Siren[vehicle] = CreateDynamicObject(186460.00.00.00.00.00.0, -1, -1, -1300.0);
                
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle0.375000,0.524999,0.3750000.0000000.0000000.000000);
            }
            if(
model == 426)
            {
                
Siren[vehicle] = CreateDynamicObject(186460.00.00.00.00.00.0, -1, -1, -1300.0);
                
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle0.524999,0.7499990.3750000.0000000.0000000.000000);
            }
            if(
model == 525)
            {
                
Siren[vehicle] = CreateDynamicObject(194190.00.00.00.00.00.0, -1, -1, -1300.0);
                
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle0.0, -0.4851.360.0000000.000000180.0);
            }
            if(
model == 579)
            {
                
Siren[vehicle] = CreateDynamicObject(186460.00.00.00.00.00.0, -1, -1, -1300.0);
                
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle,  0.6799990.4799990.7349990.0000000.0000000.000000);
            }
        }
        else
        {
            
SCM(playeridCOLOR_WHITE"Siren detached.");
            
DestroyDynamicObject(Siren[vehicle]);
            
Siren[vehicle] = 0;
        }
    }
    {
        if(
model != 490) return SCM(playeridCOLOR_GREY"The siren is compatible only for Rancher.");
        if(!
IsDriver(playerid)) return SCM(playeridCOLOR_GREY"You must be the driver.");
        if(
Siren[vehicle] == 0)
        {
            
SCM(playeridCOLOR_WHITE"Siren attached.");
            
Siren[vehicle] = CreateDynamicObject(186460.00.00.00.00.00.0, -1, -1, -1300.0);
            
AttachDynamicObjectToVehicle(Siren[vehicle], vehicle,  0.6549991.1499990.5949990.0000000.0000000.000000);
        }
        else
        {
            
SCM(playeridCOLOR_WHITE"Siren detached.");
            
DestroyDynamicObject(Siren[vehicle]);
            
Siren[vehicle] = 0;
        }
    }
    return 
1;
}

CMD:siren2(playeridparams[])
{
    new 
model GetVehicleModel(vehicle);
    if(!
IsLawEnforcement(playerid)) return SCM(playeridCOLOR_LIGHTRED"Invalid faction.");
    if(
model != 560 && model != 426) return SCM(playeridCOLOR_GREY"The siren is compatible only for Sultan/Premier.");
    if(!
IsDriver(playerid)) return SCM(playeridCOLOR_GREY"You must be the driver.");
    if(
Siren2[vehicle] == 0)
    {
        
SCM(playeridCOLOR_WHITE"Siren attached.");
        if(
model == 560)
        {
            
Siren2[vehicle] = CreateDynamicObject(194190.00.00.00.00.00.0, -1, -1, -1300.0);
            
AttachDynamicObjectToVehicle(Siren2[vehicle], vehicle0.000000, -1.2899990.3949990.0000000.0000000.000000);
        }
        if(
model == 426)
        {
            
Siren2[vehicle] = CreateDynamicObject(194190.00.00.00.00.00.0, -1, -1, -1300.0);
            
AttachDynamicObjectToVehicle(Siren2[vehicle], vehicle0.000000, -1.6699980.3499990.0000000.0000000.000000);
        }
    }
    else
    {
        
SCM(playeridCOLOR_WHITE"Siren detached.");
        
DestroyDynamicObject(Siren2[vehicle]);
        
Siren2[vehicle] = 0;
    }
    return 
1;



It's resulting in this:

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>