Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. No, you should compare them CAREFULLY. My script only uses 1 line for the MEMO, yours uses more than 6.
  2. No, actually you put that and I forgot to remove it . Check your first script.
  3. What are you talking about? My script is correct: setVehicleColor(playerVehicle, tonumber®, tonumber(g), tonumber(b)) Do you see a "thePlayer" or "true" there? I really don't.
  4. https://wiki.multitheftauto.com/wiki/Ser ... our_server https://wiki.multitheftauto.com/wiki/Resources Read these manuals.
  5. Copy the script again, now it works.
  6. That's just a TOTAL MESS. function colorHandler ( thePlayer, commandName, r, g, b ) if (not isPedInVehicle(thePlayer)) then outputChatBox("[Error]: This command only works when you're in a vehicle", thePlayer, 255, 0, 0, true) return end if (tonumber(r) and tonumber(g) and tonumber(b)) then local playerVehicle = getPedOccupiedVehicle(thePlayer) local account = getPlayerAccount(thePlayer) if (getPlayerMoney(thePlayer) >= 10000) then takePlayerMoney(thePlayer, 10000) playSoundFrontEnd(thePlayer, 46) setVehicleColor(playerVehicle, tonumber(r), tonumber(g), tonumber(b)) setAccountData(account, "color.data", toJSON({r, g, b})) outputChatBox("#2E9AFE[shop]: #FFFFFF" ..getPlayerName(thePlayer).. "#2E9AFE has bought vehicle colors. (/bc)", root, 255, 255, 255, true) else outputChatBox("[Error]: You don't have enough money.", thePlayer, 255, 0, 0, true) end else outputChatBox("[Error]: Syntax: /bc [r g b]", thePlayer, 255,0 ,0, true) end end addCommandHandler("bc", colorHandler) See if it works (not tested).
  7. GUIEditor_Memo = {} GUIEditor_Image = {} window_rules = guiCreateWindow(152,115,721,549,"Rules",false) guiWindowSetMovable(window_rules,false) guiWindowSetSizable(window_rules,false) GUIEditor_Image[1] = guiCreateStaticImage(270,31,182,129,"images/mtalogo.png",false,window_rules) GUIEditor_Memo[1] = guiCreateMemo(27,166,670,374,"\n Rules!\nServer policy: All staff members shall treat all players with great kindness and respect.\n\n1. Deathmatching is allowed, but stop means stop.\n\n2. No hacking or glitch abusing. If you see someone doing this please use /report and a the problem will be dealt with.\n\n3. Do not spam the chat, commands, or the map with cars.\n\n4. Respect all players, be kind and please do not annoy anyone.\n\n5. If you see a staff member abusing or being rude please use /report and the problem will be dealt with.\n\nIf you see anyone breaking these rules please contact a staff member by typing /report and the problem will be dealt with.\n\nEnjoy and have fun!\n -The JWF team",false,window_rules) guiMemoSetReadOnly(GUIEditor_Memo[1],true) button_accept = guiCreateButton(66,55,187,76,"Accept!",false,window_rules) button_decline = guiCreateButton(477,52,188,77,"Decline",false,window_rules)
  8. local marker1 = createMarker(1525.3000488281,2834.3999023438,23.39999961853,"checkpoint",20,255,255,255,255) local timers = {} function marker(player) if (source == marker1) then timers[player] = setTimer (function (player) if isPedInVehicle(player) then local veh = getPedOccupiedVehicle(player) if veh then destroyElement(veh) end end end, 1000, 0, player) end end addEventHandler ("onMarkerHit",getRootElement(),marker) addEventHandler ("onMarkerLeave",getRootElement(),function(player) if (source == marker1) then if isTimer(timers[player]) then killTimer(timers[player]) end end end)
  9. Haha, there's no need to do these steps, just scroll down the mouse, my bad, I don't use editor often D:
  10. https://community.multitheftauto.com/index.php?p= ... ls&id=2801 Ese recurso es un chat local, solo las personas que estan cerca pueden leerlo.
  11. Wait, I forgot that I also restarted "edf". Do this: Load definition zombies restart "edf" restart "editor_gui" Load definition zombies again. Then try.
  12. It doesn't work when you start map editor via "Map Editor" on MTA main menu, I used the editor in my local server.
  13. In your client side, you do this: triggerServerEvent( "onDataRegister", rootData, code ) What is "rootData"? because if it's not a player, 'source' in server-side will be..?
  14. Well, these steps worked for me.
  15. addEvent( "onDataRegister", true ) addEventHandler( "onDataRegister", rootMain, function( code ) local weapon = { 2, 3, 5, 6, 7 } local user = getPlayerName( source ) local db = executeSQLSelect( "DatabaseValues", "*", "Name = '"..user.."'" ) local dbw = executeSQLSelect( "DatabaseWeapon", "*", "Name = '"..user.."'" ) if (db and #db == 1) then if ( tostring(db[1]["Code"]) ~= tostring(code) ) then outputChatBox( "Falsches Passwort", source ) return end spawnPlayer( source, 2311.2, -9.4, 26.4, 0, db[1]["Skin"] ) giveWeapon( source, math.random( weapon[1], weapon[5] ), 1 ) setPlayerMoney( source, db[1]["Geld"] ) setElementHealth( source, db[1]["HP"] ) setPedArmor( source, db[1]["AP"] ) setCameraTarget( source, source ) fadeCamera( source, true, 3.0 ) else executeSQLInsert( "DatabaseValues", "'"..user.."', '"..code.."', '100', '0', '0', '78', '0', '0'" ) spawnPlayer( source, 2311.2, -9.4, 26.4, 0, 78 ) setCameraTarget( source, source ) fadeCamera( source, true, 3.0 ) end end ) P.S: You're not encrypting the password with MD5? P.S2: You're triggering the register event to getRootElement?
  16. cpztext = "CpZ" local wantedlevel = getPlayerWantedLevel () -- This function doesn't require a player element when using it client-side.
  17. I just tested and I had the same problem, I'd this: Load definition zombies restart "editor_gui" Load definition zombies again. And now I can add zombies.
  18. Did you know that map editor has an option to copy a world object? If you meant the little cabin at the entrance of the LS PD garage, then it's part of a bigger object, it's id is: 3975
  19. Create radar areas around the bases and set them zombieProof element data.
  20. You can set it to randomly spawn around San Andreas.
  21. Copia mi ultimo codigo y dime que tal ahora.
×
×
  • Create New...