-
Posts
667 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Mr.Loki
-
You can use getRealTime() and store a date to the player's account. If you want to manually count the time the player has been in the group you can use getRealTime().timestamp to get the current date in seconds and store it to his account so in the future you can use it to calculate the time he has been in the group.
-
What's wrong with the default "/report" function for the admin panel?
-
Nope, only removeElementData. removeAccountData is just a useful function which sets the value of the data in a key to false, which is what pa3ck mentioned.
-
Here u go... for i = 1, 7 do local r,g,b = i == 4 and 0,0,255 or 255,0,0 guiGridListSetItemColor(listatodoslosgrupos, row, i, r,g,b) end
-
How are you setting the skin? Is it a shader or TXD?
-
This is the wrong section. Post in the scripting section next time. local vehicleDamageTable = { -- vehicle ID and damage multiplier [427] = 5,-- Enforcer [416] = 2 -- Ambulance } addEventHandler( "onClientVehicleDamage", root, function ( _,_, loss ) if isElement(source) then -- Checks if the vehicle still exists if getElementHealth(source) > 0 then -- Checks if it's health isn't 0 (blown up) local damage = vehicleDamageTable[getElementModel(source)] if damage then setElementHealth( source, getElementHealth(source)+(loss)-(loss/sp))-- Damage that was set in the table else setElementHealth( source, getElementHealth(source)+(loss)-(loss/3)) -- Default damage modifier if vehicle not in the table end end end end)
- 18 replies
-
- vehicle
- morehealth
-
(and 1 more)
Tagged with:
-
How are you defining the classes? ACL,data,XML etc....?
-
Use inspect with dxDrawText or textCreateTextItem to see a table.
-
Try adding this, after the check. It should print the numbers in the table as a single string of text. local string = table.concat(randomNumbers,", ") outputChatBox(string)
-
Won't that only work for client sided markers? @Fist
-
getDistanceBetweenPoints3D use this to check if the marker is <, for example, 1m or 0.5m away from where the mouse was clicked in the world. Markers have no collisions so you cannot click them.
-
Stop spawning vehicles with the admin panel it corrupts the database. Look in the community or in the resources section for a dayz admin panel that spawns vehicles
-
No prob. It checks for a driver when someone exits. if there isn't a driver it will delete the vehicle but you need to add the getVehicleType function again so u won't delete other cars.
-
addEventHandler ( "onPlayerVehicleExit", getRootElement(), function(theVehicle, towedBy) local thePlayer = getVehicleController(source) if not thePlayer then destroyElement(trailer) destroyElement(trailer2) destroyElement(trailer3) outputChatBox("#FFffFFElhagytad a mozdonyt. A vagonok törlődtek!", source, r,g,b, true) end end ) Try this.
-
You can't check if the player is in a vehicle if he has just exited it. Change player in line 2 to theVehicle and remove isPedInVehicle and getPedOccupiedVehicle.