Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by ahdon

  1. Maybe you mean this? http://wiki.multitheftauto.com/wiki/KillPed
  2. ahdon


    user guiGetScreenSize to calculate the GUI position.
  3. Just go ahead and test it yourself instead of asking.
  4. ahdon

    EURO 2012

    Yes, finally a human being who doesn't hate Torres. But Nuer is too good to let two goals in, I think 1-0 as in World Cup 2008 if I recall correctly (1-0 to Spain) and torres who made the only goal.
  5. Lean lua. http://forum.multitheftauto.com/viewtop ... 97d2597614 http://wiki.multitheftauto.com/wiki/Scr ... troduction
  6. ahdon

    Chat log.

    Maybe http://wiki.multitheftauto.com/wiki/OnPlayerChat ?
  7. As far as I'm concerned I use outputChatBox twice and timer maybe once? The code is organized and should be quite easy for everyone to edit so I don't feel there is a reason to use tabulation more than what I do I also never said it was supposed to be anything complex it works perfectly.
  8. Send me the whole resource in a PM, with the server sided script and I will fix it for you.
  9. I edited my post, change it to: destroyElement(Info)
  10. Just, delete the first two lines they are rather useless or change "myWindow" to the window variable you want to set it's alpha and sizable to. And, if you don't know how am I supposed to know? Anyhow try this code: Info= guiCreateLabel(0.61,0.9333,0.6025,0.1267,"Revolution Racing",true) guiSetFont ( Info, "clear-normal" ) guiSetFont ( Info, "sa-header" ) guiLabelSetColor ( Info, 000, 000, 000 ) guiSetAlpha ( Info, 0.2222 ) local function onResourceStart() showPlayerHudComponent("weapon", false) showPlayerHudComponent("ammo", false) showPlayerHudComponent("vehicle_name", false) showPlayerHudComponent("money", false) showPlayerHudComponent("clock", false) showPlayerHudComponent("health", false) showPlayerHudComponent("armour", false) showPlayerHudComponent("breath", false) showPlayerHudComponent("area_name", false) showPlayerHudComponent("radar", false) end addEventHandler( "onClientResourceStart", getResourceRootElement( ), onResourceStart ) function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove) local x = 0 local y = 0 function moveCamera() x = x + 0.00009 y = y + 0.1000 local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, "Linear") local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, "Linear") setCameraMatrix(cameraX, cameraY, cameraZ, lookX, lookY, lookZ) if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then removeEventHandler("onClientRender", getRootElement(), moveCamera) end end addEventHandler("onClientRender", getRootElement(), moveCamera) end cameraMoveSoft(1810.669,1108,8, 1806,2037, 8, 0, 0, 0, 0, 200000, 0, "Linear") function spawn(player) if not isElement(player) then return end repeat until spawnPlayer ( player, -1964+math.random(0,0), 136+math.random(5,9), 28, 90, math.random(9,288) ) fadeCamera(player, true) setCameraTarget(player, player) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) local localPlayer = getLocalPlayer() local playerName = getPlayerName(localPlayer) sound = playSound("logowanie.ogg") setSoundVolume(sound, 1) function createPasswordWindow() windowChangepw = guiCreateWindow(0.3859,0.349,0.2219,0.1628,"Zmien haslo",true) guiSetSize(windowChangepw, 165, 21) guiSetAlpha(windowChangepw,0.80000001192093) editOldpw = guiCreateEdit(110,29,165,21,"",false,windowChangepw) guiSetAlpha(editOldpw,1) guiEditSetMasked(editOldpw,true) labelOldpw = guiCreateLabel(10,29,90,21,"Stare haslo:",false,windowChangepw) guiSetAlpha(labelOldpw,1) guiLabelSetColor(labelOldpw,255,255,255) guiLabelSetVerticalAlign(labelOldpw,"center") guiLabelSetHorizontalAlign(labelOldpw,"left",false) editNewpw = guiCreateEdit(110,60,165,21,"",false,windowChangepw) guiSetAlpha(editNewpw,1) guiEditSetMasked(editNewpw,true) guiEditSetMaxLength(editNewpw,50) labelNewpw = guiCreateLabel(10,60,90,21,"Nowe haslo:",false,windowChangepw) guiSetAlpha(labelNewpw,1) guiLabelSetColor(labelNewpw,255,255,255) guiLabelSetVerticalAlign(labelNewpw,"center") guiLabelSetHorizontalAlign(labelNewpw,"left",false) buttonChangepw = guiCreateButton(10,91,265,23,"Zmien Haslo",false,windowChangepw) guiSetAlpha(buttonChangepw,1) guiSetVisible(windowChangepw, false) addEventHandler("onClientGUIClick", buttonChangepw, clientSubmitChangepw, false) end function createLoginWindow() windowLogin = guiCreateWindow(0.3345,0.3646,0.2109,0.2018,"Zaloguj sie",true) guiSetSize(windowLogin, 430, 205, false) guiSetAlpha(windowLogin,1) labelUsername = guiCreateLabel(90,72,59,24,"Login:",false,windowLogin) guiSetAlpha(labelUsername,1) guiLabelSetColor(labelUsername,255,255,255) guiLabelSetVerticalAlign(labelUsername,"center") guiLabelSetHorizontalAlign(labelUsername,"left",false) labelPassword = guiCreateLabel(90,100,59,24,"Haslo:",false,windowLogin) guiSetAlpha(labelPassword,1) guiLabelSetColor(labelPassword,255,255,255) guiLabelSetVerticalAlign(labelPassword,"center") guiLabelSetHorizontalAlign(labelPassword,"left",false) --labelInfo = guiCreateLabel(120,26,250,17,"Witamy na Serwerze",false,windowLogin) --labelInfo = guiCreateLabel(120,56,260,27,"ll Revolution Racing ll",false,windowLogin) --guiSetAlpha(labelInfo,1) --guiLabelSetColor(labelInfo,255,255,255) --guiLabelSetVerticalAlign(labelInfo,"top") --guiLabelSetHorizontalAlign(labelInfo,"center",false) --guiSetFont(labelInfo,"default-bold-small") editUsername = guiCreateEdit(140,72,181,25,playerName,false,windowLogin) guiSetAlpha(editUsername,1) guiEditSetMaxLength(editUsername, 50) editPassword = guiCreateEdit(140,100,181,25,"",false,windowLogin) guiSetAlpha(editPassword,1) guiEditSetMasked(editPassword, true) guiEditSetMaxLength(editPassword, 50) buttonLogin = guiCreateButton(50,140,137,40,"Zaloguj",false,windowLogin) guiSetAlpha(buttonLogin,1) buttonRegister = guiCreateButton(240,140,137,40,"Zarejestruj",false,windowLogin) guiSetAlpha(buttonRegister,1) --[[ GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} windowLogin = guiCreateTabPanel(0.2898,0.3854,0.3994,0.2531,true) GUIEditor_Tab[1] = guiCreateTab("Logowanie/Rejestracja",windowLogin) GUIEditor_Edit[1] = guiCreateEdit(138,157,5,5,"",false,GUIEditor_Tab[1]) editUsername = guiCreateEdit(46,26,318,33,"",false,GUIEditor_Tab[1]) editPassword = guiCreateEdit(46,83,318,33,"",false,GUIEditor_Tab[1]) buttonLogin = guiCreateButton(237,125,127,25,"Zaloguj",false,GUIEditor_Tab[1]) guiSetProperty(GUIEditor_Button[1],"Text","Zaloguj") GUIEditor_Label[1] = guiCreateLabel(51,5,307,17,"Login",false,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(52,65,271,14,"Haslo",false,GUIEditor_Tab[1]) buttonRegister = guiCreateButton(103,125,127,25,"Zarejestruj",false,GUIEditor_Tab[1]) guiSetProperty(GUIEditor_Button[2],"Text","Zarejestruj") --]] guiSetVisible(windowLogin, false) addEventHandler("onClientGUIClick", buttonLogin, clientSubmitLogin, false) addEventHandler("onClientGUIClick", buttonRegister, clientSubmitRegister, false) end function resourceStart() createLoginWindow() if (windowLogin ~= nil) then guiSetVisible(windowLogin, true) else outputChatBox("Wystapil blad.") end showCursor(true) guiSetInputEnabled(true) end function changePw() createPasswordWindow() guiSetVisible(windowChangepw, true) showCursor(true) guiSetInputEnabled(true) end function clientSubmitLogin(button, state) if button == "left" and state == "up" then local username = guiGetText(editUsername) local password = guiGetText(editPassword) if username and password then triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password) else guiSetText(labelInfo, "Podaj login i haslo.") end end end function clientSubmitRegister(button, state) if button == "left" and state == "up" then local username = guiGetText(editUsername) local password = guiGetText(editPassword) if username and password then triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password) else guiSetText(labelInfo, "Podaj login i haslo.") end end end function clientSubmitChangepw(button, state) if button == "left" and state == "up" then local oldpassword = guiGetText(editOldpw) local newpassword = guiGetText(editNewpw) if oldpassword and newpassword then triggerServerEvent("submitChangepw", getRootElement(), localPlayer, oldpassword, newpassword) else outputChatBox("Podaj stare i nowe haslo.") end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(windowLogin, false) showCursor(false) fadeCamera ( false, 2.0, 0, 0, 0) setTimer (Kamera, 3000, 1 ) end local screenWidth, screenHeight = guiGetScreenSize ( ) local messageLoadnig = "Ladowanie" function Kamera() setCameraInterior(200) fadeCamera(true,5) dxDrawText("* ".. messageLoadnig,503.0,16.0,573.0,32.0,tocolor(0,0,255,170),0.8,"sans","left","top",false,false,false) end function unknownError() outputChatBox("Nie wypelniles wszystkich pól.", player) end function loginWrong() outputChatBox("Wpisales niepoprawne dane.", player) end function registerTaken() outputChatBox("Nazwa uzytkownika jest juz zajeta.", player) end hidePasswordWindow = function() guiSetVisible(windowChangepw, false) end addEvent("hidePasswordWindow", true) addEvent("hideLoginWindow", true) addEvent("unknownError", true) addEvent("loginWrong", true) addEvent("registerTaken", true) addEventHandler("hidePasswordWindow", getRootElement(), hidePasswordWindow) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) addEventHandler("unknownError", getRootElement(), unknownError) addEventHandler("loginWrong", getRootElement(), loginWrong) addEventHandler("registerTaken", getRootElement(), registerTaken)
  11. 1. myWindow isn't created anywhere hence the first two bad arguements (line 1 & 2) 2. Can't find the function: "hidePasswordWindow" anywhere. Line: 246 3. the gui window "info" isn't created anywhere, hence the bad arguement @ 213 4. dxDrawColorText? do you mean: dxDrawText? line: 226
  12. Good, and since I did not understand the last replies what's not working/what do you need help with?
  13. Seems like this has been discussed for quite some while.. Most scripters will NOT script for only staff powers. They want money, so offer some cash and you might find a scripter. Also, maybe put in some more information like website, gamemode and so on..
  14. ahdon


    If it's only on a specific server, then I don't think it's related to your MTA, rather the server itself.
  15. This is an English part of the forums, use one of the other languages board if you're going to speak another language.
  16. Simple login system I made quite a while ago. Easy to install, easy to use good interface, uses MTASA's inbuild account system.. I honestly don't know what more to write so I'll just give you guys a video of it: Video: Download: http://www.mediafire.com/?b6424e5xvmg6mek (The community side did not work for some reason)
  17. Oh, no the MTASA's account system is inbuilt. And I honestly don't know if it would over-flood the server (using mtasa's account system) but I doubt it would.
  18. I'm not really sure about the mysql but sqlite wouldn't overflow.
  19. function pickweed() local x,y,z = getElementPosition(localPlayer) local xr,yr,zr = getElementRotation(localPlayer) object = createObject (1578, x,y-0.0999755859,z+0.300000191) setElementRotation(object, xr, yr+82, zr+270) addEventHandler("onClientPreRender",root,updateObjectCoords) end addCommandHandler ("pick", pickweed ) function updateObjectCoords() local x,y,z = getElementPosition(localPlayer) local xr,yr,zr = getElementRotation(localPlayer) setElementPosition(object, x,y-0.0999755859,z+0.300000191) setElementRotation(object, xr, yr+82, zr+270) setElementCollisionsEnabled(object, false) end
  20. http://www.squidoo.com/sqlitehammer http://www.squidoo.com/sqliteprogramming http://www.squidoo.com/sqlitetutorial http://www.squidoo.com/sqlitedatabasedesign
  • Create New...