Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. You can't know that. Depends what gamemode servers are using tho. It depends also how many players will play in current server. Hard to say, really.
  2. WhoAmI

    Vehicle lock

    MrTasty, tell me. When shall I use source, when root, and when other elements? It may help me a lot. Thanks.
  3. WhoAmI

    Vehicle lock

    Ah yea, don't know how this 'source' instead of 'root' got there. Thank XeoN-.
  4. WhoAmI

    Vehicle lock

    Errors in debugscript3? Imo has to work.
  5. WhoAmI

    Vehicle lock

    Yea, only serverside. It should work like that: player want to enter a car, but if there is controller of this vehicle he can enter only on "G".
  6. WhoAmI

    Vehicle lock

    addEventHandler ( "onVehicleStartEnter", source, function ( player, seat ) if ( isElement ( getVehicleOccupant ( source ) ) and seat == 0 ) then cancelEvent ( ) end end ) Server side.
  7. I have no idea how to do that, sorry.
  8. Well, didn't know that. If so, use that addEventHandler ( "onClientProjectileCreation", root, function ( ) if ( getProjectileType ( source ) == 20 ) then setElementDimension ( source, math.random ( 2, 999 ) ) destroyElement ( source ) end end )
  9. addEventHandler ( "onClientProjectileCreation", root, function ( ) if ( getProjectileType ( source ) == 20 ) then destroyElement ( source ) end end ) Put it on client side.
  10. Do NOT create second topic if you already have one, lol.
  11. 32 bit [url=http://files.directadmin.com/services/debian_6.0/libmysqlclient.so.16]http://files.directadmin.com/services/d ... ient.so.16[/url] 64 bit [url=http://files.directadmin.com/services/debian_6.0_64/libmysqlclient.so.16]http://files.directadmin.com/services/d ... ient.so.16[/url] and follow this commands cd /urs/lib/ rm -f libmysqlclient.so.16 #to delete old wget use_link_from_above!! chmod 755 libmysqlclient.so.16
  12. Man, I have script which shows me which site has nulled IPB, and which not. You have nulled one. Look at the bottom of the image.
  13. WhoAmI

    [Help] Decompose

    Well, I made function for it if this string's length will be higher than 5. Look at this function decompse ( n ) if ( type ( n ) == "number" ) then local l = string.len ( n ) local t = { } for i=0,l do table.insert ( t, string.sub ( n, i + 1, ( l - i ) * (-1) ) ) end return t end end It returns table with decompsed numbers. Here is the proof:
  14. WhoAmI

    [Help] Decompose

    You can use string.sub Example local text = "12345" local v1 = string.sub ( text, 1, -5 ) local v2 = string.sub ( text, 2, -4 ) local v3 = string.sub ( text, 3, -3 ) local v4 = string.sub ( text, 4, -2 ) local v5 = string.sub ( text, 5, -1 ) print(v1 .. " " .. v2 .. " " .. v3 .. " " .. v4 .. " " .. v5) Output:
  15. Yea, wanted to ask about OOP, that it would be the problem and it really is.
  16. That's really weird. I can't see any error or mistake in your code. It has to work... Well, maybe it will cause nothing, but try to call another event in HandleRequest function to another file with client event. Also check if files are in coded in UTF-8. Sometimes it can be a problem. And check type ( source ) in client side if it returns userdata.
  17. Check what the type of mods is by using type Also you are triggering to server double localPlayer - as source and argument. What is it for? Also try to trigger another thing, not only list of mods and check if it returns correct value in client side.
  18. WhoAmI

    Tyres

    Well, you are right though. But I couldn't set rotation of this cuboid after creating it. If there would be possibility to do that I would definitely use cuboid.
  19. Didn't see at all in beginning. Good that you showed me this error. Have fun with scritpting!
  20. After changing this line too? local loggin = logIn(source, username, password) change it to local loggin = logIn(source, account, password)
  21. WOW. DIDNT SEE THAT! Mate replace it with local loggin = logIn(source, account, password) Has to work now.
  22. Server local posX, posY, posZ = 2584.9523925781, -2209.318359375, 1.9927320480347 function loginHandler(username, password) local account = getAccount(username, password) outputChatBox ( "1" ) if ( account ) then local loggin = logIn(source, username, password) outputChatBox ( "2" ) if ( loggin ) then outputChatBox ( "3" ) spawnPlayer(source, posX, posY, posZ) fadeCamera(source, true) setCameraTarget(source, source) setPedArmor(source, 100) setElementModel(source, 287) outputChatBox("Wow, you actually made it on", source) triggerClientEvent(source, "hideLoginWindow", source) end else outputChatBox("Invalid username or password!",source) end end addEvent("submitLogin", true) addEventHandler("submitLogin", getRootElement(), loginHandler) Client local playerName = getPlayerName(localPlayer) local guiElements = { } function clientSubmitLogin() local username = guiGetText(guiElements["edit_user"]) local password = guiGetText(guiElements["edit_pass"]) if ( username ~= "" and password ~= "" ) then triggerServerEvent("submitLogin", localPlayer, username, password) outputChatBox ( username .. ":" .. password ) else outputChatBox("Please enter a username and password.") end end function createLoginWindow() guiElements["login_window"] = guiCreateWindow(0.375, 0.375, 0.25, 0.25, "Please Log In", true) guiCreateLabel(0.0825, 0.375, 0.25, 0.25, "Username", true, guiElements["login_window"]) guiCreateLabel(0.0825, 0.5, 0.25, 0.25, "Password", true, guiElements["login_window"]) guiElements["edit_user"] = guiCreateEdit(0.415, 0.25, 0.5, 0.15, "", true, guiElements["login_window"]) guiElements["edit_pass"] = guiCreateEdit(0.415, 0.5, 0.5, 0.15, "", true, guiElements["login_window"]) guiEditSetMaxLength(guiElements["edit_user"], 20) guiEditSetMaxLength(guiElements["edit_pass"], 20) guiElements["login_button"] = guiCreateButton(0.415, 0.7, 0.25, 0.20, "Log In", true, guiElements["login_window"]) addEventHandler("onClientGUIClick", guiElements["login_button"], clientSubmitLogin, false) end addEventHandler("onClientResourceStart", resourceRoot, function () createLoginWindow() outputChatBox("Welcome to My MTA:SA Server, please log in.") showCursor(true) guiSetInputEnabled(true) end ) function hideLoginWindow() guiSetInputEnabled(false) showCursor(false) if ( isElement ( guiElements["login_window"] ) ) then destroyElement ( guiElements["login_window"] ) end end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) Tell me how many number it will show in chatbox.
  23. So it should work. If it doesn't add this resource in admin group in acl.xml <object name="resource.resource_name" />
×
×
  • Create New...