Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. I can make it, PM me your msn/skype details so we can talk.
  2. You want a script which creates vehicles only available to ACL, Team, Account? and the vehicles has to be saved on a database so they'll be re-created when resource starts.
  3. This script was stolen from SX BOSS server.
  4. I would use a trigger to server side to destroy the vehicle/fix it.
  5. You mean something like this? spawnPoints = {} spawnPoints["keys"] = {} spawnPoints["keys"]["values"] = {}
  6. Well, you can search for it in the script and remove everything related to it?
  7. I recommend to make a table with the name and the XML file, then when click the grid list load the content of that file. E.g: local myFiles = { ["Hello"] = "hello.xml", ["World"] = "world.xml", }
  8. Because that just makes no sense. function destroyVeh() local theVehicle = getPedOccupiedVehicle (localPlayer) if (theVehicle) then destroyElement (theVehicle) outputChatBox("Your vehicle has been destroyed.", 0, 255, 0) else outputChatBox("You aren't in a vehicle.", 255, 0, 0) end end addEventHandler("onClientGUIClick", destroyButton, destroyVeh, false) function fixVeh() local theVehicle = getPedOccupiedVehicle (localPlayer) if (theVehicle) then fixVehicle (theVehicle) outputChatBox("Your has been fixed your vehicle.", 0, 255, 0) else outputChatBox("You aren't in a vehicle.", 255, 0, 0) end end addEventHandler("onClientGUIClick", fixButton, fixVeh, false)
  9. You mean give the player health? example: player has 50 HP, and you write /health 20 and the player health will be 70 HP? if so: addCommandHandler( 'health', function( player, cmd, theHealth ) local theHealth = tonumber(theHealth) if (theHealth) then setElementHealth(player, getElementHealth( player ) + theHealth) outputChatBox( 'Your health is now '..tostring( math.floor( getElementHealth( player ) ) )..'!',player,0,255,0 ) end end )
  10. My opinion is that it should return a table with every group and their group members.
  11. Introduction to resources: https://wiki.multitheftauto.com/wiki/Resources Introduction to meta.xml: https://wiki.multitheftauto.com/wiki/Meta.xml
  12. Again uploaded "city-of-war": https://community.multitheftauto.com/index.php?p= ... ls&id=3826
  13. Ayudar es corregir un script que esta mal, lo que tenes vos es algo al azar.
  14. El evento "onClientVehicleExplode" no tiene el parametros. Deberias aprender mas antes de intentar hacer este script, no te a ser facil.
  15. There's already one released: https://community.multitheftauto.com/index.php?p= ... ls&id=3035
  16. Castillo

    Help

    Nope, it would still be clickable. P.S: DX drawing functions has the parameter postGUI.
  17. Castillo

    Need Help

    function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local blip = createBlipAttachedTo (player, 41, 4, 255, 0, 0, 255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) addCommandHandler("orten", orten)
  18. Post or PM me the full client side, I'll test it on my server. Edit: I've found the error: --[[ --@@author Draken --@@18-02-2012 ]]-- local table = executeSQLQuery("CREATE TABLE IF NOT EXISTS Profile ( player TEXT, name TEXT, month NUMBER, day NUMBER, year NUMBER, mail TEXT )") addEvent('onPlayerNotLoggedIn',true) addEvent('isPlayerGuest',true) addEvent('onSaveSettings',true) addEvent('onSaveOutput',true) addEvent('onClickSave',true) addEventHandler('isPlayerGuest',root, function() local account = getPlayerAccount(source) if not isGuestAccount(account) then triggerClientEvent('onPanelOpen',source) else triggerEvent('onPlayerNotLoggedIn',source) end end) addEventHandler('onPlayerNotLoggedIn',root, function() outputChatBox("#ABCDEF* #ffffffYou are not logged in!",source,255,255,255,true) end ) addEventHandler('onSaveOutput',root, function() outputChatBox('#ABCDEF* #ffffffYour settings have been saved!',source,255,255,255,true) end ) addEventHandler('onPlayerLogin',root, function (_, account) local result = executeSQLQuery("SELECT * FROM Profile WHERE player = '"..getAccountName(account).."'") if (not result or #result == 0) then executeSQLQuery("INSERT INTO Profile VALUES ( '"..getAccountName(account).."', '', 'Month', 'Day', 'Year', '' )") end local resultt = executeSQLQuery("SELECT * FROM Profile WHERE player = '"..getAccountName(account).."'") -- "'" was missing. triggerClientEvent('onLoginLoad',source,tostring(resultt[1]['name']),tostring(resultt[1]['month']),tostring(resultt[1]['day']),tostring(resultt[1]['year']),tostring(resultt[1]['mail'])) end ) addEventHandler('onClickSave',root, function(thePlayer,name,month,day,year,mail) local update = executeSQLQuery("UPDATE Profile SET name='"..name.."', month='"..month.."', day='"..day.."', year='"..year.."', mail='"..mail.."' WHERE player='"..getAccountName(getPlayerAccount(source)).."'") triggerEvent('onSaveOutput',source) end )
  19. local table = executeSQLQuery("CREATE TABLE IF NOT EXISTS Profile ( player TEXT, name TEXT, month NUMBER, day NUMBER, year NUMBER, mail TEXT )") addEvent('onSaveOutput',true) addEvent('onClickSave',true) addEventHandler('onSaveOutput',root, function() outputChatBox('#ABCDEF* #ffffffYour settings have been saved!',source,255,255,255,true) end ) addEventHandler('onPlayerLogin',root, function (_, account) local result = executeSQLQuery("SELECT * FROM Profile WHERE player = '"..getAccountName(account).."'") if (not result or #result == 0) then executeSQLQuery("INSERT INTO Profile VALUES ( '"..getAccountName(account).."', '', 'Month', 'Day', 'Year', '' )") end local resultt = executeSQLQuery("SELECT * FROM Profile WHERE player = "..getAccountName(account).."'") triggerClientEvent('onLoginLoad',source,tostring(resultt[1]['name']),tostring(resultt[1]['month']),tostring(resultt[1]['day']),tostring(resultt[1]['year']),tostring(resultt[1]['mail'])) end ) addEventHandler('onClickSave',root, function(thePlayer,name,month,day,year,mail) local update = executeSQLQuery("UPDATE Profile SET name='"..name.."', month='"..month.."', day='"..day.."', year='"..year.."', mail='"..mail.."' WHERE player='"..getAccountName(getPlayerAccount(source)).."'") triggerEvent('onSaveOutput',source) end )
  20. Castillo

    Need Help

    function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local blip = createBlipAttachedTo (player, 41, 4, 255, 0, 0, 255, 0, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) addCommandHandler("orten", orten)
  21. Castillo

    warp

    function sendMessage2( message, messageType) if message then if(string.find(message, "warp me to"))then local player = gettok ( message, 4, string.byte(' ') ) outputChatBox("warped to ".. player) executeCommandHandler ( "warp", source, player ) end end end addEventHandler("onPlayerChat",root,sendMessage2)
×
×
  • Create New...