Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. "DMV" cars are used in Roleplay game modes, when you take the license test you must drive around some markers.
  2. One day? why? are you going to die in one day or something? if you really want to learn, you'll need more than one day.
  3. Castillo

    How to do this

    This is a mess, if i'm right you are cleaning the window's table again. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} function createthegui() GUIEditor_Window[1] = guiCreateWindow(307,67,288,305,"FARPG:Spawnmenu",false) GUIEditor_Button[1] = guiCreateButton(9,23,102,46,"Army Rangers...",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,79,104,41,"Police...",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,23,102,46,"Army Rangers...",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(9,23,102,46,"Army Rangers...",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(9,130,104,43,"Criminal...",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(9,185,104,44,"Civiillian...",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(9,237,104,43,"Admin...",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(142,29,132,44,"Army Rangers \nOnly",false,GUIEditor_Window[1]) GUIEditor_Memo[2] = guiCreateMemo(142,79,133,40,"Police Team",false,GUIEditor_Window[1]) GUIEditor_Memo[3] = guiCreateMemo(142,129,131,42,"For the badasses",false,GUIEditor_Window[1]) GUIEditor_Memo[4] = guiCreateMemo(143,179,129,41,"Peaceful way to\nEarn money",false,GUIEditor_Window[1]) GUIEditor_Memo[5] = guiCreateMemo(144,239,131,42,"Admin ONLY",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[1], armyWindowCreate, false) -- you put armyWidnow, but is armyWindow. addEventHandler("onClientGUIClick", GUIEditor_Button[6], armyspawn, false) end function armyWindowCreate() GUIEditor_Window[2] = guiCreateWindow(409,90,101,298,"Army Rangers",false) GUIEditor_Button[1] = guiCreateButton(9,26,83,46,"Airforce",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,79,83,49,"Assault unit",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,134,83,49,"Special forces",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(9,188,83,45,"Recruit",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(9,244,83,43,"Back",false,GUIEditor_Window[1]) end I'm guessing the main GUI is shown, right?
  4. I just went to the site and found out that you cannot select the port, when you click it doesn't let you select.
  5. I always drop the table, maybe there's a easy way, but that's the one I always use.
  6. Sorry? what for? what he's asking (if i'm right) is to get the weapon from player's HAND, not a pickup or a object. Think twice before post.
  7. What........? get position of what? a weapon is not a object or so, you can create pickups of them anyway.
  8. Yes, that should work. executeSQLDropTable indeed drops a table(removes it). and executeSQLDelete is used to remove a row in your table.
  9. Yes, not sure about: getResourceRootElement(getThisResource()) but well, I use just root element.
  10. function playerJoin() executeSQLCreateTable ( "playerStats", "playerHealth, playerArmor, playerMoney, playerName TEXT" ) end addEventHandler("onResourceStart", getRootElement(), playerJoin) function addInfoToSQL() fetchPlayerHealth = getElementHealth(source) fetchPlayerArmor = getPedArmor(source) fetchPlayerMoney = getPlayerMoney(source) sourcename = getPlayerName ( source ) result = executeSQLSelect ( "playerStats", "playerName", "playerName = '" .. sourcename .. "'" ) if ( type( result ) == "table" and #result == 0 ) or not result then outputChatBox ( "First Visit " .. sourcename .. "!", source ) executeSQLInsert ( "playerStats", "'none', 'none', 'none', '" .. tostring(sourcename) .."'" ) else outputChatBox ( "Welcome back " .. sourcename .. "!", source ) executeSQLUpdate ( "PlayerStats", "playerHealth = '".. tonumber(fetchPlayerHealth) .."', playerArmor = '".. tonumber(fetchPlayerArmor) .."', playerMoney = '".. tonumber(fetchPlayerMoney) .."'","playerName = '" .. tostring(sourcename) .. "'") result = executeSQLSelect ( "playerStats", "playerHealth, playerArmor, playerMoney, playerName" ) outputChatBox("Your Health: " .. result[1].playerHealth) outputChatBox("Your Armor: " .. result[1].playerArmor) outputChatBox("Your Money: " .. result[1].playerMoney) outputChatBox("Your Name: " .. result[1].playerName) end end addEventHandler ( "onPlayerSpawn", getRootElement(), addInfoToSQL) Maybe a bit too late, but would help someone else .
  11. addEventHandler( "onClientGUIClick", GUIEditor_Button[1], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[2], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[3], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[4], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[5], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[6], onClick) addEventHandler( "onClientGUIClick", GUIEditor_Button[7], onClick) Why you used all these...? with just one it would work as you are using 'elseif'.
  12. function upgrade( ) for k, v in ipairs(getElementsByType( "players" ) do data = getElementData( v, "exp" ) giveexp = data + 10 setElementData(v,"exp",giveexp) end end setTimer(upgrade, 1000, 0 ) setTimer has to be below the function.
  13. Try this (client side) function WeaponDamage(attacker, weapon, bodypart, loss) if(weapon == 30 or weapon == 31) then cancelEvent() setElementHealth(source, getElementHealth(source)-(loss*2)) end end addEventHandler("onClientPlayerDamage",getRootElement(),WeaponDamage)
  14. Castillo

    Camera Target

    Maybe you mean 'freecam'? is a resource that comes with MTA when you install it.
  15. Castillo

    Team skin

    'getPlayerSkin' is deprecated, use getElementModel instead.
  16. John, check his marker variable name: markername1, maybe he's going to add more? ex: markername2, markername3, etc, etc.
  17. The truth is... 15 slots aren't much, if you want to run a popular server/gamemode you'll need more slots, else it becomes a useless work.
  18. Y que es lo que no anda? no podemos ayudarte si no aportas informacion sobre el tema.
  19. That's because of the visible distance. Emmetgun = createBlip ( 1366.7922363281, -1274.9412841797, -1274.9412841797, 0, 2, 255, 0, 0, 255, 0, 0) Try with that.
  20. Meh, is he really a "Scripter"? because this has nothing to do with GUI, also, it's pretty simple to do this. moneyTimers = {} addEventHandler("onVehicleEnter",root, function (thePlayer) if getElementModel(source) == 574 then moneyTimers[thePlayer] = setTimer(givePlayerMoney,60000,0,thePlayer,500) end end) addEventHandler("onVehicleExit",root, function (thePlayer) if getElementModel(source) == 574 then if isTimer(moneyTimers[thePlayer]) then killTimer(moneyTimers[thePlayer]) end end end) Try with that, it should work. P.S: Is server-side.
  21. No, Try, take a look at the wiki example: https://wiki.multitheftauto.com/wiki/OnC ... ayerWasted
  22. For particles: https://community.multitheftauto.com/index.php?p= ... ls&id=1292
  23. CLEO doesn't work in MTA. You can't change the vehicle sounds, you can create new ones, but the originals will stay in the back.
×
×
  • Create New...