nick1995
Members-
Posts
88 -
Joined
-
Last visited
Everything posted by nick1995
-
Because: Somebody was lost his password, and we gave him a new password, but that password we have to encrypt to MD5... You understand? ;3 Thanks Thanks everybody for help!
-
Yeah i know, for my websites i use also Phpmyadmin... But "sqllitebrowser" its not a fine programa Hmm weird about the passwords
-
Okey thank you! So if i understand, you can edit the internal.db but you have to restart the server? I have also 2 questions: I can't find it, but how are the passwords encrypt? (not MD5 ...) And is there a alternatif for sqllitebrowser? The resource doesn't work... :3
-
Can you edit the ACL file or database in game, or you have to restart the server finaly?
-
That is nice, thank you! Are there more programs like sqllitebrowser ?
-
Hi, How can you look in to the database of your server? Because i have a bank resource, and that used a database, but i want to look in to the database... Second question, Where are the users saved of your server? Also i have a login script, and that used a database to...
-
Oke, i understand. I am learning LUA scripting, is there a possibilty to make it admin only? I thought it would work, but it does not work... if i look in the server file, i cant find the function to show or hide the window...
-
Hi, I want the freeroam resource only for the ACL group "Nick en Mitchel" , but what is wrong here: function() fadeCamera(true) setTimer(getPlayers, 1000, 1) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Nick en Mitchel" ) ) ) then bindKey('f1', 'down', toggleFRWindow) createWindow(wndMain) hideAllWindows() guiCheckBoxSetSelected(getControl(wndMain, 'jetpack'), doesPedHaveJetPack(g_Me)) guiCheckBoxSetSelected(getControl(wndMain, 'falloff'), canPedBeKnockedOffBike(g_Me)) setJetpackMaxHeight ( 9001 ) triggerServerEvent('onLoadedAtClient', g_ResRoot, g_Me) end Thanks for your help!
-
What is a client side exactly? I have google it, but i dont understand it..
-
Yes i have readed that, but i dont understand how to get it in my script... And my post is deleted....
-
I'm sorry, I don't understand you
-
I get the same error, [2012-05-12 18:54:20] ERROR: unzipped\water_level2\water_level.lua:57: attempt to call global 'playSound' (a nil value)
-
I had try that, but what have i to do. In the meta it is good, but in the script? I had try that, but there wasn't a sound, i think i do something wrong, thats the reason for this topic...
-
It works! The resource "carvehiclesystemshops" cant handle with this...
-
Hi everyone, I have the resource water_level (https://community.multitheftauto.com/index.php?p= ... ils&id=630) Now i want if the water level is going up, that he played a sound "alarm.mp3" I have readed that i have to add in the meta.xml this: "alarm.mp3" type="client" /> But where and what have i to do here: water_level.lua level = 0 highlevel = 0 floodWater1 = 0 function setAllWatersLevel(level) setWaterLevel(level) if isElement(floodWater1) then if (getElementType(floodWater1) == "water") then if (level > 0.2) then setWaterLevel(floodWater1, level) else setWaterLevel(floodWater1, -500) end 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 ) 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.2) 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.2) 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 Level changed by " .. getPlayerName ( source ) .. " to a level " .. highlevel .. ".", 3 ) end end end addEvent( "onWaterLevel", true ) addEventHandler( "onWaterLevel", getRootElement(), waterLevel ) function showClientGui(source, command, highlevel) local neg = get("allow_negative") if (get("restrict_to") ~= "") then if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( get("restrict_to") ) ) ) then triggerClientEvent( source, "onShowWindow", getRootElement(), level, neg, highlevel) end else triggerClientEvent( source, "onShowWindow", getRootElement(), level, neg, highlevel) end end addCommandHandler("water", showClientGui) function addSomeWater ( highlevel ) local thelevel = level local speed = tonumber(get("speed")) level = thelevel + tonumber(speed) setAllWatersLevel(level) if (level >= highlevel) then level = highlevel if ( isTimer(waterTimer)) then killTimer(waterTimer) end setFloodEndWeather() end end function removeSomeWater ( highlevel ) local thelevel = level local speed = tonumber(get("speed")) level = thelevel - speed setAllWatersLevel(level) if (level <= highlevel) then level = highlevel if ( isTimer(waterTimer)) then killTimer(waterTimer) end end end function initialize() setWaterLevel(0) floodWater1 = createWater ( -2998, -2998, -500, 2998, -2998, -500, -2998, 2998, -500, 2998, 2998, -500) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), initialize) function destroy() if ( isTimer(waterTimer)) then killTimer(waterTimer) end setWaterLevel(floodWater1, -500) setWaterLevel(0) setFloodEndWeather() end addEventHandler ( "onResourceStop", getRootElement(), destroy) function onPlayerJoin() setAllWatersLevel(level) end addEventHandler( "onPlayerJoin", getRootElement(), onPlayerJoin ) You can see this: function waterLevel ( source, glevel ) 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.2) 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 I hope someone can help me. I am learning to script MTA
-
Thanks for your reaction! But it doesn't work
-
Yes, The first one you save us meta.xml The second one as respawn.lua You take it into a .zip file and in the resource folder. In the commando (if the server is running) you do "refresh" Then he said, new resource added: "carspawn" Then you do the command "start carspawn" He said, "Carspawn started" Then i destroy a vehicle in the gameplay, (with my weapon i blow the vehicle up) And he doesn't spawn back? Sorry for my bad english (:
-
Thanks for your reaction, but it doesn't work here. The car dont spawn back
-
Thanks for your reaction, but how is it possible that my godmode script works fine with the same things: function toggleGodMode(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Nick en Mitchel" ) ) ) or accountName == "driessen9" then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("Nick en Mitchel zijn niet aardig ;D - godmode is nu uit.",thePlayer,0,255,0) else setElementData(thePlayer,"invincible",true) outputChatBox("Nick en Mitchel Zijn aardig ;D - godmode is aan!",thePlayer,0,255,0) end end end addCommandHandler("godmode",toggleGodMode) Because you got nothing wrong there?
-
Hi, I have download the "invisible script" , and now i want that the command only can be used by the ACL group "Nick en Mitchel" This is my script: iv = 0 function toggleInvis( source ) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Nick en Mitchel" ) ) ) then if iv == 0 then iv = 1 setPlayerNametagShowing(source, false) setElementAlpha(source, 0) else iv = 0 setPlayerNametagShowing(source, true) setElementAlpha(source, 255) end end end addCommandHandler ( "invisible", toggleInvis ) I get the errors: [2012-05-10 21:44:35] WARNING: invisible\invisible.lua:4: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2012-05-10 21:46:33] WARNING: invisible\invisible.lua:4: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] Maybe someone can learn me how to do this?
-
Hi, I have set many cars in the map. But in the gamemode, if a car exploded, how can i do that the car comes back at the spawn place? Regards, Nick
-
Haha, thanks but the email doesn't work :c
-
Hmm, his E-mail doesn't work I get a error back.