Jump to content

[HELP] Sirens


GrubaS

Recommended Posts

Posted

It's just a object attached to the car.

You need to get the sirens object, then replace it with a object.

And then to attach it:

createObject 
attachElements 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Hello , I've got a dff file with 3 different objects in chassis_dummy ,

extra1 - 'driving school' plate placed on the cheetah

extra2 - sirens placed on the cheetah also

extra3 - normal cheetah

Now the question is how can i make extra2 only for Admins , so if the player was in the group 'Admin' then he will have siren on his cheetah.

Any help would be greatly appreciated.

Posted

Use:

isObjectInACLGroup 

then the function to attach extra2

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

Posted

Hello Guys,

I want make this script for Cheetah (id=419) and only for admins,

How do it? :|

addEventHandler("onVehicleEnter",root,function(player,seat) 
    local accountname = getAccountName (getPlayerAccount(player)) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) )  then 
   if(player)and(seat==0)then 
      addVehicleSirens(source,1,2) 
      setVehicleSirens(source,1, 0.4, -0.2, 0.6, 0, 0, 255, 255, 255) 
      addVehicleSirens(source,2,2) 
      setVehicleSirens(source,2, -0.4, -0.2, 0.6, 255, 0, 0, 255, 255) 
   end 
   end 
end) 
addEventHandler("onVehicleExit",root,function(player,seat) 
   if(player)and(seat==0)then 
      removeVehicleSirens(source) 
   end 
end) 

Posted

After

if(player)and(seat==0)then 

follow Solidsnake's suggestion:

It's just a object attached to the car.

You need to get the sirens object, then replace it with a object.

And then to attach it:

createObject 
attachElements 

Use those functions to create the object (the siren object you want) and attach the object to the vehicle.

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

Posted

I want make, if points is 100 / 300 / 400 then on my car will be "School Driver" but when points will be more than 1000 then it will be car without "school driver" :)

ps. sry for english ;x

function setMyVehiclesVariant() 
    if (tonumber(getElementData(source,"points")) = 1000) then 
  
        local wasSet = setVehicleVariant(source, 0, 255) 
  else 
    local wasSet = setVehicleVariant(source, 255, 255) 
end 
end 
addEventHandler ( "onVehicleEnter", root,setMyVehiclesVariant) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...