Jump to content

TheJamcof

Members
  • Posts

    10
  • Joined

  • Last visited

TheJamcof's Achievements

Member

Member (5/54)

0

Reputation

  1. TheJamcof

    Need help!

    Hello! Help me with this script! I don't know how to add coordinates. And I want it to will be show too in F11, in same location. Like GreenZone. I hope it will be working. Sorry my english. local R = 0 local G = 255 local B = 0 function buildNotice() safeLabel = guiCreateLabel(0.35, 0, 1, 1, "You are in a Safe Zone.", true) guiSetFont(safeLabel, "sa-header") guiLabelSetColor(safeLabel,R,G,B) guiSetVisible(safeLabel,false) end addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() ), buildNotice) function godMode() cancelEvent() end addEvent("zoneEnter", true) addEventHandler("zoneEnter", getRootElement(), function() guiSetVisible(safeLabel, true) addEventHandler ( "onClientPlayerDamage", getRootElement(), godMode) end ) addEvent("zoneExit", true) addEventHandler("zoneExit", getRootElement(), function() guiSetVisible(safeLabel, false) removeEventHandler ( "onClientPlayerDamage", getRootElement(), godMode) end )
  2. TheJamcof

    Help me!

    I can't try explain better. Okey I can try... The idea is that when someone is in car and pressing/holding key "LCTRL"(LeftCTRL) it makes makes nitro as u know but, I want it works like when only pressing/holding the key and only then nitro works. And when player RELEASE the key then nitro stops. I mean like in CIT2 server the nitro system. Get it? Sorry my bad english
  3. TheJamcof

    Help me!

    The Idea is when holding CTRL button then nitro keeps going for so long time when next time will release the CTRL button. Sorry I don't have any Lua. Because I don't even know how to start the script. This maybe can be little bit hard .
  4. TheJamcof

    Help pls!

    Hello! I don't know how to add one thing to here. The idea is when some one player will disconnect from server and connect back, then his old drift scores will be showing in scoreboard/TAB list. I want the scores will be saved before player will disconnect from server. So the players will not lose them scores. Hope you guys understand this. This was hard to explain. Sorry about my bad english skills. local root = getRootElement() local thisResourceRoot = getResourceRootElement(getThisResource()) local drift_records = {} local drift_mejor = 0 local drift_nombre = "N/A" addEventHandler ( "onResourceStart", thisResourceRoot, function() call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Best Drift") call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Last Drift") call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Total Drift") executeSQLCreateTable("recordsDrift","pista TEXT, nombre TEXT, score INTEGER") addEvent("driftClienteListo", true) addEventHandler("driftClienteListo", root, function(player) triggerClientEvent(player, "driftActualizarRecord", root, drift_mejor, drift_nombre) if drift_mejor == 0 then outputChatBox("There's no record set on this map", player) else outputChatBox(string.format("The current record is %d points (%s)", drift_mejor, drift_nombre), player) end end) end ) addEventHandler ( "onResourceStop", thisResourceRoot, function() call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Best Drift") call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Last Drift") call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Total Drift") end ) addEventHandler ( "onGamemodeMapStart", root, function(mapResource) local mapname = getResourceInfo(mapResource, "name") or getResourceName(mapResource) local command = string.format("pista='%s'",mapname) local record = executeSQLSelect("recordsDrift","nombre, score",command) if #record == 0 then executeSQLInsert("recordsDrift",string.format("'%s', 'N/A', 0",mapname)) drift_mejor = 0 drift_nombre = "N/A" else drift_mejor = record[1]["score"] drift_nombre = record[1]["nombre"] end triggerClientEvent(root, "driftActualizarRecord", root, drift_mejor, drift_nombre) triggerClientEvent(root, "driftResetAllScores", root) if drift_mejor == 0 then outputChatBox("There's no record set on this map") else outputChatBox(string.format("The current record is %d points (%s)", drift_mejor, drift_nombre)) end end) addEventHandler ( "onGamemodeMapStop", root, function(mapResource) local mapname = getResourceInfo(mapResource, "name") or getResourceName(mapResource) if not mapname then return end local command = string.format("pista='%s'",mapname) executeSQLUpdate("recordsDrift",string.format("nombre = '%s', score = %d", drift_nombre, drift_mejor), command) end) addEventHandler("onVehicleDamage", root, function() thePlayer = getVehicleOccupant(source, 0) if thePlayer then triggerClientEvent(thePlayer, "driftCarCrashed", root, source) end end) addEvent("driftNuevoRecord", true) addEventHandler("driftNuevoRecord", root, function(score, name) if score > drift_mejor then outputChatBox(string.format("New drift record! (%d points) (%s)",score,name)) drift_mejor = score drift_nombre = name triggerClientEvent(root, "driftActualizarRecord", root, drift_mejor, drift_nombre) end end)
  5. Still wouldn't freeze it though, put setMinuteDuration with some big value in it and it will look frozen. Btw. no need for semicolons. Can someone show me how to add setMinuteDuration to this script? (Because I don't have skills )
  6. Hello! This script's idea was, when I type command "t12" then it make time freezed to 12:00, but it won't work. function setTimeAndNotify( 12, 00 ) setTime ( 12, 00 ) local notifyMessage = string.format("Time changed to %12d:%00d!", hour, minute) outputChatBox ( notifyMessage ) end addCommandHandler ("t12") Please help me! Thank you!
  7. I am bad with scripts but I try my best (, I am just training). I tried to make script. And the idea was When some player will type command "fix" then her vehicle will be fixed. bool fixVehicle ( vehicle theVehicle ) addCommandHandler ( string "fix", function handlerFunction, [bool restricted = false, bool caseSensitive = true] ) Sorry about my bad english I hope I will get answer pretty fast, Thank you.
×
×
  • Create New...