Jump to content

viktorX

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by viktorX

  1. hello guys i wanna ur help how to makes the name tags just display for admins and the players can't see each other
  2. hello i need someone to tell me how to make a script like that: log for players cmds i mean when someone type any cmd it's saves to file in ftp I also want to make a script to watch the cmds of a particular player inside the server how to make that?
  3. حصلت معي كتير طلعت المشكلة اني مغير اسم فاكشن الحكومة لحل هذة المشكلة رجع اسم فاكشن الحكومة مثل ماكان Government of Los Santos /renamefaction 3 Government of Los Santos لو متحلتش و انت مسمي الفاكشن كدا اصلا والمشكلة لسا موجودة جرب تحط فلوس في الفاكشن
  4. سلام عليكم .. في مشكلة تواجهني لما احط قاعدة البيانات تبع الحياه الواقعيه في خادم لينكس لوحة php admin يطلع كلام كذا SQL query: -- -- Database: `owl_mta` -- -- -------------------------------------------------------- -- -- Table structure for table `accounts` -- CREATE TABLE IF NOT EXISTS `accounts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` text, `password` varchar(32) NOT NULL, `salt` varchar(30) NOT NULL DEFAULT '1234567890', `email` varchar(100) NOT NULL, `registerdate` datetime DEFAULT CURRENT_TIMESTAMP, `lastlogin` datetime DEFAULT NULL, `ip` text, `admin` float NOT NULL DEFAULT '0', `supporter` float NOT NULL DEFAULT '0', `vct` float NOT NULL DEFAULT '0', `mapper` float NOT NULL DEFAULT '0', `scripter` float NOT NULL DEFAULT '0', `warn_style` int(1) NOT NULL DEFAULT '1', `hiddenadmin` tinyint(3) unsigned DEFAULT '0', `adminjail` tinyint(3) unsigned DEFAULT '0', `adminjail_time` int(11) DEFAULT NULL, `adminjail_by` text, `adminjail_reason` text, `muted` tinyint(3) unsigned DEFAULT '0', `globalooc` tinyint(3) unsigned DEFAULT '1', `friendsmessage` va[...] MySQL said: Documentation #1067 - Invalid default value for 'registerdate'
  5. عليكم انا عندي سيرفر حياه واقعية ولكن في مشكلتين الاولي : الشوب وعامل البنزين لا يعملو عندا اضغط عليهم كلك يمين لا يظهر لي اي شي انا مسوي debugscript كثير item-system ظهرلي الكلام الاحمر دا + مغير مود Error:item-system\c_inventory:607:attempt to index upvalue 'clickitemslot' (a boolean value) shop-system ومود fuel-system ومود وبرضو مش شغال المشكلة الثانية :شريط الاشعارات حق الفاكاشنات لا يعمل Notifications ارجو الحل شكرا!!
  6. Hello guys at first i have a roleplay server the problem: when i enter my server and type user , pass i see sending request to the server and nothing happen then Picture: and i see that errors in log: [2017-04-15 21:24:39] ERROR: mysql/connection.lua:206: attempt to call global 'mysql_escape_string' (a nil value) [2017-04-15 21:24:39] ERROR: mysql/connection.lua:206: attempt to call global 'mysql_escape_string' (a nil value) [2017-04-15 21:24:39] ERROR: account/login-panel/server.lua:32: call: failed to call 'mysql:escape_string' [string "?"] [2017-04-15 21:24:39] ERROR: account/login-panel/server.lua:32: attempt to concatenate a boolean value [2017-04-15 21:27:22] ERROR: mysql/connection.lua:62: attempt to call global 'mysql_ping' (a nil value) script of the files that have errors: CODE REMOVED BY Solidsnake14
  7. hello, i opened a new roleplay server and after i finished it and try to login i got that : sending request to the server can anyone advise me? https://d.top4top.net/p_4564n0bl1.png server.lua script: --MAXIME / 2014.12.29 local mysql = exports.mysql local accountCharacters = {} function validateCredentials(username,password,checksave) if not (username == "") then if not (password == "") then if checksave == true then triggerClientEvent(client,"saveLoginToXML",client,username,password) else triggerClientEvent(client,"resetSaveXML",client,username,password) end return true else triggerClientEvent(client,"set_warning_text",client,"Login","Please enter your password!") end else triggerClientEvent(client,"set_warning_text",client,"Login","Please enter your username!") end return false end addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",getRootElement(),validateCredentials) function playerLogin(username,password,checksave) local encryptionRuleData, encryptionRuleQuery, accountCheckQuery, preparedQuery, accountData,newAccountHash,safeusername,safepassword = nil if not validateCredentials(username,password,checksave) then return false end --Get Encyption Rule for user. preparedQuery = "SELECT * FROM `accounts` WHERE `username`='".. mysql:escape_string(username) .."'" encryptionRuleQuery = mysql:query(preparedQuery) if encryptionRuleQuery then --triggerClientEvent(client,"set_authen_text",client,"Login","Retrieving encryption rule for username '".. username .."'..") else triggerClientEvent(client,"set_warning_text",client,"Login","Failed to connect to game server. Database error!") return false end if (mysql:num_rows(encryptionRuleQuery) > 0) then --triggerClientEvent(client,"set_authen_text",client,"Login","Encryption rule successfully retrieved!") else triggerClientEvent(client,"set_warning_text",client,"Login","Account name '".. username .."' doesn't exist!") return false end accountData = mysql:fetch_assoc(encryptionRuleQuery) mysql:free_result(encryptionRuleQuery) -- Check if the account is banned if exports.bans:checkAccountBan(accountData["id"]) then triggerClientEvent(client,"set_warning_text",client,"Login","Account is banned.") return false end --Now check if passwords are matched or the account is activated, this is to prevent user with fake emails. triggerClientEvent(client,"set_authen_text",client,"Login","Password Accepted! Authenticating..") local encryptionRule = accountData["salt"] local encryptedPW = string.lower(md5(string.lower(md5(password))..encryptionRule)) if accountData["password"] ~= encryptedPW then triggerClientEvent(client,"set_warning_text",client,"Login","Password is incorrect for account name '".. username .."'!") return false end if accountData["activated"] == "0" then triggerClientEvent(client,"set_warning_text",client,"Login","Account '".. username .."' is not activated.") return false end --Validation is done, fetching some more details triggerClientEvent(client,"set_authen_text",client,"Login","Account authenticated! Logging in..") -- Check the account is already logged in local found = false for _, thePlayer in ipairs(exports.pool:getPoolElementsByType("player")) do local playerAccountID = tonumber(getElementData(thePlayer, "account:id")) if (playerAccountID) then if (playerAccountID == tonumber(accountData["id"])) and (thePlayer ~= client) then kickPlayer(thePlayer, thePlayer, "Someone else has logged into your account.") triggerClientEvent(client,"set_authen_text",client,"Login","Account is currently online. Disconnecting other user..") break end end end -----------------------------------------------------------------------START THE MAGIC----------------------------------------------------------------------------------- triggerClientEvent(client, "items:inventory:hideinv", client) -- Start the magic setElementDataEx(client, "account:loggedin", true, true) setElementDataEx(client, "account:id", tonumber(accountData["id"]), true) setElementDataEx(client, "account:username", accountData["username"], true) setElementDataEx(client, "electionsvoted", accountData["electionsvoted"], true) --STAFF PERMISSIONS / MAXIME setElementDataEx(client, "admin_level", tonumber(accountData['admin']), true) setElementDataEx(client, "supporter_level", tonumber(accountData['supporter']), true) setElementDataEx(client, "vct_level", tonumber(accountData['vct']), true) setElementDataEx(client, "mapper_level", tonumber(accountData['mapper']), true) setElementDataEx(client, "scripter_level", tonumber(accountData['scripter']), true) exports['report-system']:reportLazyFix(client) setElementDataEx(client, "adminreports", tonumber(accountData["adminreports"]), true) setElementDataEx(client, "adminreports_saved", tonumber(accountData["adminreports_saved"])) if tonumber(accountData['referrer']) and tonumber(accountData['referrer']) > 0 then setElementDataEx(client, "referrer", tonumber(accountData['referrer']), false, true) end if exports.integration:isPlayerLeadAdmin(client) then setElementDataEx(client, "hiddenadmin", accountData["hiddenadmin"], true) else setElementDataEx(client, "hiddenadmin", 0, true) end --fetchRemote ( "https://forums.owlgaming.net/image.php?u=" .. tonumber(accountData["id"]) .. "&type=thumb", myCallback, "", false, accountData["id"] ) --[[ --ADMINS local staffDuty = tonumber(accountData["duty_admin"]) or 0 if exports.integration:isPlayerTrialAdmin(client) then setElementDataEx(client, "duty_admin", staffDuty , true) setElementDataEx(client, "wrn:style", tonumber(accountData["warn_style"]), true) end --GMs if exports.integration:isPlayerSupporter(client) then --GMs setElementDataEx(client, "duty_supporter", staffDuty , true) end ]] --MAXIME / VEHICLECONSULTATIONTEAM / 18.02.14 local vehicleConsultationTeam = exports.integration:isPlayerVehicleConsultant(client) setElementDataEx(client, "vehicleConsultationTeam", vehicleConsultationTeam, false) if tonumber(accountData["adminjail"]) == 1 then setElementDataEx(client, "adminjailed", true, true) else setElementDataEx(client, "adminjailed", false, true) end setElementDataEx(client, "jailtime", tonumber(accountData["adminjail_time"]), true) setElementDataEx(client, "jailadmin", accountData["adminjail_by"], true) setElementDataEx(client, "jailreason", accountData["adminjail_reason"], true) if accountData["monitored"] ~= "" then setElementDataEx(client, "admin:monitor", accountData["monitored"], true) end exports.logs:dbLog("ac"..tostring(accountData["id"]), 27, "ac"..tostring(accountData["id"]), "Connected from "..getPlayerIP(client) .. " - "..getPlayerSerial(client) ) mysql:query_free("UPDATE `accounts` SET `ip`='" .. mysql:escape_string(getPlayerIP(client)) .. "', `mtaserial`='" .. mysql:escape_string(getPlayerSerial(client)) .. "' WHERE `id`='".. mysql:escape_string(tostring(accountData["id"])) .."'") --[[ local dataTable = { } table.insert(dataTable, { "account:characters", characterList( client ) } ) accountCharacters[tonumber(accountData["id"])] = dataTable ]] setElementDataEx(client, "jailreason", accountData["adminjail_reason"], true) triggerEvent("updateCharacters", client) exports.donators:loadAllPerks(client) local togNewsPerk, togNewsStatus = exports.donators:hasPlayerPerk(client, 3) if (togNewsPerk) then setElementDataEx(client, "tognews", tonumber(togNewsStatus), false, true) end --SETTINGS / MAXIME loadAccountSettings(client, accountData["id"]) -- Check if player passed application --outputDebugString(type(accountData["appreason"])) if tonumber(accountData["appstate"]) < 3 then if exports.integration:isPlayerTrialAdmin(client) or exports.integration:isPlayerSupporter(client) then exports.mysql:query_free("UPDATE `accounts` SET `appstate`='3', `appreason`=NULL WHERE `id`='"..accountData["id"].."' ") else triggerClientEvent(client, "vehicle_rims", client) triggerClientEvent(client, "accounts:login:attempt", client, 0 ) triggerEvent( "social:account", client, tonumber( accountData.id ) ) triggerClientEvent (client,"hideLoginWindow",client) return false end end triggerClientEvent(client, "vehicle_rims", client) triggerClientEvent(client, "accounts:login:attempt", client, 0 ) triggerEvent( "social:account", client, tonumber( accountData.id ) ) triggerClientEvent (client,"hideLoginWindow",client) end addEvent("accounts:login:attempt",true) addEventHandler("accounts:login:attempt",getRootElement(),playerLogin) function myCallback( responseData, errno, id ) if errno == 0 then --Cache it exports.cache:addImage(id, responseData) end end function playerFinishApps() if source then client = source end local index = getElementData(client, "account:id") triggerClientEvent(client, "accounts:login:attempt", client, 0)--, accountCharacters[index] ) triggerEvent( "social:account", client, index ) triggerClientEvent (client,"hideLoginWindow",client) triggerClientEvent (client,"apps:destroyGUIPart3",client) --accountCharacters[index] = nil end addEvent("accounts:playerFinishApps",true) addEventHandler("accounts:playerFinishApps",getRootElement(),playerFinishApps) --local lastClient = nil function playerRegister(username,password,confirmPassword, email) --CHECK FOR EXISTANCE OF USERNAME AND EMAIL ADDRESS / MAXIME local preparedQuery1 = "SELECT `id` FROM `accounts` WHERE `username`='".. mysql:escape_string(username) .."' OR `email`='".. mysql:escape_string(email) .."' " local Q1 = mysql:query(preparedQuery1) if not Q1 then triggerClientEvent(client,"set_warning_text",client,"Register","Error code 0002 occurred.") return false end if (mysql:num_rows(Q1) > 0) then triggerClientEvent(client,"set_warning_text",client,"Register","Username or email existed.") mysql:free_result(Q1) return false end --CHECK FOR EXISTANCE OF MTA SERIAL TO ENCOUNTER MULTIPLE ACCOUNTS PER USER / MAXIME. local mtaSerial = getPlayerSerial(client) local preparedQuery2 = "SELECT `mtaserial`, `username`, `id` FROM `accounts` WHERE `mtaserial`='".. toSQL(mtaSerial) .."' LIMIT 1" local Q2 = mysql:query(preparedQuery2) if not Q2 then triggerClientEvent(client,"set_warning_text",client,"Register","Error code 0003 occurred.") return false end local usernameExisted = mysql:fetch_assoc(Q2) if (mysql:num_rows(Q2) > 0) and usernameExisted["id"] ~= "1" then triggerClientEvent(client,"set_warning_text",client,"Register","Multiple Accounts is not allowed (Existed: "..tostring(usernameExisted["username"])..")") return false end mysql:free_result(Q2) --START CREATING ACCOUNT. local encryptionRule = tostring(math.random(0,9))..tostring(math.random(0,9))..tostring(math.random(0,9))..tostring(math.random(0,9))..tostring(math.random(0,9))..tostring(math.random(0,9))..tostring(math.random(0,9))..tostring(math.random(0,9))..tostring(math.random(0,9))..tostring(math.random(0,9)) local encryptedPW = string.lower(md5(string.lower(md5(password))..encryptionRule)) local ipAddress = getPlayerIP(client) preparedQuery3 = "INSERT INTO `accounts` SET `username`='"..toSQL(username).."', `password`='"..toSQL(encryptedPW).."', `email`='"..toSQL(email).."', `registerdate`=NOW(), `ip`='"..toSQL(ipAddress).."', `salt`='"..toSQL(encryptionRule).."', `mtaserial`='"..mtaSerial.."', `activated`='1' " local id = mysql:query_insert_free(preparedQuery3) if id and tonumber(id) then triggerClientEvent(client,"accounts:register:complete",client, username, password) return true else triggerClientEvent(client,"set_warning_text",client,"Register","Could not create new account.") return false end --[[ local token = exports.usercontrolpanel:makeToken(id, "INGAME_ACC_REGISTRATION") lastClient = client callRemote( "http://www.owlgaming.net/mta/functions.php", function(error) outputDebugString(tostring(error)) if error == "ok" then triggerClientEvent(lastClient,"accounts:register:complete",lastClient, username, password) return true else if error == nil or error == "ERROR" then --In case webserver is not available. --mysql:query_free("UPDATE accounts SET activated=1 WHERE id='"..id.."'") --triggerClientEvent(lastClient,"accounts:register:complete",lastClient, "Account has been created and activated.") return true else triggerClientEvent(lastClient,"set_warning_text",lastClient,"Register",error) return false end end end, token, id, username, email) --]] end addEvent("accounts:register:attempt",true) addEventHandler("accounts:register:attempt",getRootElement(),playerRegister) function toSQL(stuff) return mysql:escape_string(stuff) end
  8. interior-system yes ???? Here are the files inside interior-system what file u want me to upload What file do you want me to codes?
  9. hello guys, I have a problem with me and this problem happened with me a lot I did not find a solution is that I buy houses but nothing happens, my money ends and the house remains for sale can anyone advise me??? iam using Roleplay Gammode
  10. i searched file by file and i can't found text spawnPlayer
  11. bro i can't understand what u mean
  12. but i changed the teleports from the files not from sql
  13. photos for my resources
  14. what u mean dude? i need the name of file
  15. Hello guys , when someone die or kill and he press on respawn he moving to another city can anyone tell me where i can change it i need the location of file
  16. Hello, after i added water level mod i joined to test it but it's not works i did /water i have seen a panel but not works Codes: water_level level = 0 highlevel = 0 floodWater1 = 0 floodWater2 = 0 floodWater3 = 0 floodWater4 = 0 function setAllWatersLevel(level) setWaterLevel(level) if isElement(floodWater1) then if (getElementType(floodWater1) == "water") then setWaterLevel(floodWater1, level) end end if isElement(floodWater2) then if (getElementType(floodWater2) == "water") then setWaterLevel(floodWater2, level) end end if isElement(floodWater3) then if (getElementType(floodWater3) == "water") then setWaterLevel(floodWater3, level) end end if isElement(floodWater4) then if (getElementType(floodWater4) == "water") then setWaterLevel(floodWater4, level) end end end function deleteWaters() if isElement(floodWater1) then if (getElementType(floodWater1) == "water") then destroyElement ( floodWater1 ) end end if isElement(floodWater2) then if (getElementType(floodWater2) == "water") then destroyElement ( floodWater2 ) end end if isElement(floodWater3) then if (getElementType(floodWater3) == "water") then destroyElement ( floodWater3 ) end end if isElement(floodWater4) then if (getElementType(floodWater4) == "water") then destroyElement ( floodWater4 ) end end end function checkLevel(glevel) local allow_negative = get("allow_negative") if ((allow_negative == "false") and (tonumber(glevel) < 0)) then return false end return true end function setFloodWeather() local flood_weather = get("flood_weather") if (flood_weather ~= "") then setWeather(tonumber(flood_weather)) end end function setFloodEndWeather() local flood_end_weather = get("flood_end_weather") if (flood_end_weather ~= "") then setWeather(tonumber(flood_end_weather)) end end function waterLevel ( source, glevel ) outputDebugString ( "TEST3", 3 ) if (get("restrict_to") ~= "") then if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( get("restrict_to") ) ) ) then if ( checkLevel(glevel) == true ) then highlevel = tonumber ( glevel ) if (highlevel == nil) then highlevel = 0 end if (highlevel ~= level) then if ( isTimer(waterTimer)) then killTimer(waterTimer) end --water is going up if (highlevel > level) then setFloodWeather() waterTimer = setTimer ( addSomeWater, 100, 0, highlevel ) if (get("show_messages") == "true") then if (highlevel > 0) then outputChatBox ( "ALERT: A FLOOD IS EMERGING! WE ESTIMATE A WATER LEVEL OF "..tostring(highlevel).." meters", getRootElement(), 255, 0, 0 ) else outputChatBox ( "INFO: A DROUGHT IS LEAVING! WE RETURN TO A WATER LEVEL OF "..tostring(highlevel).." meters", getRootElement(), 0, 255, 0 ) end end else --water is going down setFloodEndWeather() waterTimer = setTimer ( removeSomeWater, 100, 0, highlevel ) if (get("show_messages") == "true") then if (highlevel > 0) then outputChatBox ( "INFO: A FLOOD IS LEAVING! WE RETURN TO A WATER LEVEL OF "..tostring(highlevel).." meters", getRootElement(), 0, 255, 0 ) else outputChatBox ( "ALERT: A DROUGHT IS COMING! WE ESTIMATE A WATER LEVEL OF "..tostring(highlevel).." meters", getRootElement(), 255, 0, 0 ) end end end outputDebugString ( "Water changed by " .. getPlayerName ( source ) .. " to a level " .. highlevel .. ".", 3 ) end end end else if ( checkLevel(glevel) == true ) then highlevel = tonumber ( glevel ) if (highlevel == nil) then highlevel = 0 end if (highlevel == level) then else if ( isTimer(waterTimer)) then killTimer(waterTimer) end --water is going up if (highlevel > level) then setFloodWeather() waterTimer = setTimer ( addSomeWater, 100, 0, highlevel ) if (get("show_messages") == "true") then if (highlevel > 0) then outputChatBox ( "ALERT: A FLOOD IS EMERGING! WE ESTIMATE A WATER LEVEL OF "..tostring(highlevel).." meters", getRootElement(), 255, 0, 0 ) else outputChatBox ( "INFO: A DROUGHT IS LEAVING! WE RETURN TO A WATER LEVEL OF "..tostring(highlevel).." meters", getRootElement(), 0, 255, 0 ) end end else --water is going down setFloodEndWeather() waterTimer = setTimer ( removeSomeWater, 100, 0, highlevel ) if (get("show_messages") == "true") then if (highlevel > 0) then outputChatBox ( "INFO: A FLOOD IS LEAVING! WE RETURN TO A WATER LEVEL OF "..tostring(highlevel).." meters", getRootElement(), 0, 255, 0 ) else outputChatBox ( "ALERT: A DROUGHT IS COMING! WE ESTIMATE A WATER LEVEL OF "..tostring(highlevel).." meters", getRootElement(), 255, 0, 0 ) end end end outputDebugString ( "Water changed by " .. getPlayerName ( source ) .. " to a level " .. highlevel .. ".", 3 ) end end end end addEvent( "onWaterLevel", true ) addEventHandler( "onWaterLevel", getRootElement(), waterLevel ) function showClientGui(source, command) local neg = get("allow_negative") triggerClientEvent( source, "onShowWindow", getRootElement(), level, neg) end addCommandHandler("water", showClientGui) function addSomeWater ( highlevel ) local thelevel = level local speed = tonumber(get("speed")) level = thelevel + tonumber(speed) if (level > 0) then floodWater1 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater1, -1500.0, -1500.0, level) floodWater2 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater2, 1500.0, -1500.0, level) floodWater3 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater3, -1500.0, 1500.0, level) floodWater4 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater4, 1500.0, 1500.0, level) else deleteWaters() end setAllWatersLevel(level) if (level >= highlevel) then if ( isTimer(waterTimer)) then killTimer(waterTimer) end setFloodEndWeather() end end function removeSomeWater ( highlevel ) local thelevel = level local speed = tonumber(get("speed")) level = thelevel - speed if (level > 0) then floodWater1 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater1, -1500.0, -1500.0, level) floodWater2 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater2, 1500.0, -1500.0, level) floodWater3 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater3, -1500.0, 1500.0, level) floodWater4 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater4, 1500.0, 1500.0, level) else deleteWaters() end setAllWatersLevel(level) if (level <= highlevel) then if ( isTimer(waterTimer)) then killTimer(waterTimer) end end end function initialize() setWaterLevel(0) end addEventHandler ( "onResourceStart", getRootElement(), initialize) function destroy() if ( isTimer(waterTimer)) then killTimer(waterTimer) end deleteWaters() setWaterLevel(0) setFloodEndWeather() end addEventHandler ( "onResourceStop", getRootElement(), destroy) function onPlayerJoin() deleteWaters() if (level > 0) then floodWater1 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater1, -1500.0, -1500.0, level) floodWater2 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater2, 1500.0, -1500.0, level) floodWater3 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater3, -1500.0, 1500.0, level) floodWater4 = createWater ( -2998, -2998, level, 2998, -2998, level, -2998, 2998, level, 2998, 2998, level) setElementPosition(floodWater4, 1500.0, 1500.0, level) end setAllWatersLevel(level) end addEventHandler( "onPlayerJoin", getRootElement(), onPlayerJoin ) Code2: water_gui localPlayer = getLocalPlayer() allow_negative = "false" x,y = guiGetScreenSize() WaterWin = {} function isNumeric(a) return type(tonumber(a)) == "number" end WaterWin = guiCreateWindow(x/2 - 127,y/2 - 70,254,140,"Water Level - by Dr4x",false) EditCurrLevel = guiCreateEdit(105,35,136,23,"",false,WaterWin) guiEditSetReadOnly(EditCurrLevel,true) EditObjLevel = guiCreateEdit(105,67,135,22,"",false,WaterWin) LblCurrentLevel = guiCreateLabel(10,38,87,22,"Current level",false,WaterWin) LblObjectiveLevel = guiCreateLabel(10,72,85,14,"Objective level",false,WaterWin) guiLabelSetColor(LblObjectiveLevel,255,0,0) BtnCancel = guiCreateButton(171,111,69,20,"Cancel",false,WaterWin) BtnOk = guiCreateButton(95,111,69,20,"Set",false,WaterWin) guiSetVisible ( WaterWin, false ) function showWindow(level, neg) guiSetText(EditCurrLevel, level) allow_negative = neg showCursor(true) guiSetVisible(WaterWin, true) end addEvent("onShowWindow", true) addEventHandler("onShowWindow", getRootElement(), showWindow) function onClickBtn ( button, state ) if (button == "left" and state == "up") then if (source == BtnCancel) then --if he clicked Cancel showCursor(false) guiSetVisible ( WaterWin, false ) elseif (source == BtnOk) then --if he clicked Ok changeWaterLevel() end end end addEventHandler("onClientGUIClick", BtnOk, onClickBtn, false) addEventHandler("onClientGUIClick", BtnCancel, onClickBtn, false) function changeWaterLevel() if ( guiGetVisible ( WaterWin ) == true ) then if isNumeric(guiGetText(EditObjLevel)) then if ((allow_negative) == "false" and (tonumber(guiGetText(EditObjLevel)) < 0)) then guiEditSetCaretIndex ( EditObjLevel, 0 ) else triggerServerEvent( "onWaterLevel", localPlayer, localPlayer, guiGetText(EditObjLevel) ) showCursor(false) guiSetVisible ( WaterWin, false ) end else guiEditSetCaretIndex ( EditObjLevel, 0 ) end end return true end bindKey("enter", "down", changeWaterLevel)
  17. it's my friend server and i have the ftp can u tell me where i get the code?
  18. Hello, my login panel is not works can anyone advise me???? http://d.top4top.net/p_43745cir1.jpg
×
×
  • Create New...