Jump to content

DayZ Help me


1LoL1

Recommended Posts

Please someone help me .. did not someone make a script to write

/bloodall = it gives each player on the server 12000 Blood

/FIXALL = fix all the cars on the server

I just created a script / blood that it will complement my 12 000 Blood but do not know how to give each player

and that's typed into the chat Admin has healed all player

Admin fix all cars

Edited by Guest
Link to comment
Can't you at least give it a try? if it doesn't work, you post it here and we'll help you.

But I know just do /blood and /fix single player but for the entire server I do not know but I tried hopelessly These are the scripts

function kill (source) 
   setElementData ( source, "blood", -2000 ) 
end 
addCommandHandler ( "kill", kill ) 
  

function fix (playerSource) 
    local theVehicle = getPedOccupiedVehicle (playerSource) 
    if theVehicle and getVehicleController ( theVehicle ) == playerSource then 
         fixVehicle (theVehicle) 
         outputChatBox ("" , thePlayer) 
    end 
end 
addCommandHandler ("fix" , fix) 

Link to comment
  • Moderators

I don't want to bypass what Solidsnake is trying to do but here is two hints:

getElementsByType ( "player" ) 

returns a table that contains all players element on the server

for index, value in ipairs ( myTable ) do 
  
end 

Is a lua loop that will iterate over myTable. For each loop (1 loop per value in the table) index will contain the position the loop is at in the table (1, 2, 3 ...) and value will contain the value and the position in the table.

If it's the 3rd loop, then index = 3 and value will be the 3rd value in the list.

Link to comment

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