Jump to content

Help me !!


xXNemesiSXx

Recommended Posts

Posted

Sorry for my bad english, i'm italian :D

I don't know how i can get all players and all vehicles in a lua script...

i want to kill and destroy all players and all vehicles, but before to do this i have to get them. how ca i do this ? :roll:

Posted
function killBlow() 
for i,players in pairs(getElementsByType("player")) do killPed(players) end 
for i,vehicles in pairs(getElementsByType("vehicle")) do blowVehicle(vehicles) end 
end 
addCommandHandler("killandblow") 

Should work.

Posted
function killBlow() 
for i,players in pairs(getElementsByType("player")) do killPed(players) end 
for i,vehicles in pairs(getElementsByType("vehicle")) do blowVehicle(vehicles) end 
end 
addCommandHandler("killandblow") 

Should work.

thanks a lot !! :D

but ...look here...

do killPed(players) end 

why you used killPed and not killPlayer or something like that?

Posted

Hunter, just because you can make a timer it doesn't means you are an scripter ;)

also this fails.

setTimer ( destroyElement, time_in_milliseconds, times_to_execute_the_function, element_name ) 

example of element name:

myelement = createObject() 

P.S: Why would he use a timer instead of just destroyElement?

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...