Jump to content

Bilal135

Members
  • Posts

    843
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Bilal135

  1. Lol, just put 'false' at the end of playSound. playSound("files/lightswitch.mp3", false)
  2. function onGuiClick() if (source == GUIEditor.button[1]) then local rowa = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) local namea = guiGridListGetItemText( GUIEditor.gridlist[1], rowa, columna) local rowb = guiGridListGetSelectedItem( GUIEditor.gridlist[2] ) local nameb = guiGridListGetItemText( GUIEditor.gridlist[2], rowb, columnb) if namea == "Pershing Square" then triggerServerEvent("pershingsquarespawn", localPlayer) guiSetVisible(GUIEditor.window[1], false) showCursor(false) end if namea == "Idlewood Gas Station (IGS)" then triggerServerEvent("IGS", localPlayer) guiSetVisible(GUIEditor.window[1], false) showCursor(false) end if nameb == "Army (287)" then setElementModel(localPlayer, 287) end end end addEventHandler("onClientGUIClick", root, onGuiClick) It spawns me on the right place but it doesn't set my skin to 287......Any help?
  3. Why would he make and send you script? Go away....No body is gonna make a script for you, this is not "request" board, this is helping board.
  4. 87? Huh, see your self in Hindi board 3 or 4.....
  5. How many Indians registered on MTA forums? 4.... Anubhav, Rudransh, Om, Deepu...... How many Pakistanis? A lot....Just check Urdu board. We're the best <3
  6. function unIdentified() local thesmart = getForumMember(getMemberFromName("TheSmart")) if thesmart then setMemberSucknessLevel(thesmart, 100) outputChatBox("TheSmart sucks!", root, 255, 0, 0) else outputChatBox("TheSmart member doesn't exist!", root, 255, 0, 0) end end addEventHandler("unIdentifiedEvent", getRootElement(), unIdentified)
  7. What are you talking about there is no GUI in my code only Gives hydra on start. Next time post full code with Gui. I dont wanna share it so I pmed you it.
  8. Gives an hydra on start, doesn't work when we press buy hydra, and doesn't even replace hydra model.
  9. Still doesn't work and gives everybody hydra on start.
  10. I replaced every source with v, and then: lua 15 : bad argument #1 to 'pairs' table expected got nil. addEvent("clientReady", true) addEventHandler("clientReady",resourceRoot, function() table.insert( readyPlayerList, client ) end ) function theHydra() for i, v in pairs (readyPlayerList) do local team = getPlayerTeam(v) if team and getTeamFromName("Warriors") then triggerClientEvent(v, "replacemodel", v) end local money = getPlayerMoney(v) if not (money > 24999) then return outputChatBox("You don't have enough money to afford this vehicle!", v, 255, 0, 0) end takePlayerMoney(v, 25000) local x, y, z = getElementPosition(v) local veh = createVehicle(520, x, y, z) outputChatBox("You purchased #ffffffHydra!", v, 0, 355, 0, true) warpPedIntoVehicle(v, veh) triggerClientEvent(v, "replacemodel", v) end end addEventHandler("Hydra", root, theHydra)
  11. I tried this, but doesn't work. It doesn't spawn any hydra even. server.lua addEvent("clientReady", true) addEventHandler("clientReady",resourceRoot, function() table.insert( readyPlayerList, client ) end ) function theHydra() for i, v in pairs (readyPlayerList) do local team = getPlayerTeam(source) if team and getTeamFromName("Warriors") then triggerClientEvent(player, "replacemodel", player) end local money = getPlayerMoney(source) if not (money > 24999) then return outputChatBox("You don't have enough money to afford this vehicle!", source, 255, 0, 0) end takePlayerMoney(source, 25000) local x, y, z = getElementPosition(source) local veh = createVehicle(520, x, y, z) outputChatBox("You purchased #ffffffHydra!", source, 0, 355, 0, true) warpPedIntoVehicle(source, veh) player = source triggerClientEvent(player, "replacemodel", player) end end addEventHandler("Hydra", root, theHydra) client.lua addEvent("replacemodel", true) addEventHandler("replacemodel", root, function() txd = engineLoadTXD ( "hydra.txd" ) engineImportTXD ( txd, 587 ) dff = engineLoadDFF ( "hydra.dff", 0 ) engineReplaceModel ( dff, 587 ) end ) addEventHandler("onClientResourceStart",resourceRoot, function() triggerServerEvent( "clientReady", resourceRoot ) end )
  12. I actually wanted it for my shop system, so I edited the code where we buy the hydra. Should it be like this? function theHydra() local team = getPlayerTeam(source) if team and getTeamFromName("Warriors") then txd = engineLoadTXD ( "hydra.txd" ) engineImportTXD ( txd, 587 ) dff = engineLoadDFF ( "hydra.dff", 0 ) engineReplaceModel ( dff, 587 ) end end local money = getPlayerMoney(source) if not (money > 24999) then return outputChatBox("You don't have enough money to afford this vehicle!", source, 255, 0, 0) end takePlayerMoney(source, 25000) local x, y, z = getElementPosition(source) local veh = createVehicle(520, x, y, z) outputChatBox("You purchased #ffffffHydra!", source, 0, 355, 0, true) warpPedIntoVehicle(source, veh) end addEventHandler("Hydra", root, theHydra) Will it spawn the modded hydra for the team and default hydra if player isnt in Warriors team?
  13. No body will help you to make your cloned server.
  14. Is it possible that one modded hydra model will spawn for a specific team only? Otherwise, if player isnt in that specific team it will spawn the default hydra? Can someone put an example? function replaceModel() local team = getPlayerTeam(source) if team and getTeamFromName("Warriors") then --engine replace thingy-- else return false end end addEventHandler("onClientResourceStart", root, replaceModel) Should it be like this? Please help.
  15. To prevent knife kill, he can use. addEventHandler("onClientStealthKill", localPlayer, function() local team = getPlayerTeam(localPlayer) if not team then return false end local teamname = getTeamFromName("Team Name") if teamname then cancelEvent() else return false end end ) Untested.
  16. Rest in peace SKC function noob() local nooblevel = getMemberNoobLevel(getMemberFromName("|IND|Rudransh|PRO|")) if nooblevel == 100 then outputQuickReply("Rudransh is biggest noob!", root, 255, 0, 0) else return false end end addEventHandler("unIdentifiedEvent", getForumRootElement(), noob) Results: 100% as always.
  17. Lol, if you are talking about any item or object. Use: createObject An example: addCommandHandler("createbox", function() local x, y, z = getElementPosition(localPlayer) createObject(1271, x, y, z, 0, 0, 0, false) outputChatBox("Box created!", 0, 255, 0) end ) More information about this function can be read here: www.wiki.multitheftauto.com/wiki/createObject This creates a box on player's current position if player types /createbox.
  18. Something like this? function friendlyFire() local team = getPlayerTeam(source) if team then if getTeamName(source) == "Team Name" then setTeamFriendlyFire(source, true) else return false end end end addEventHandler("onResourceStart", root, friendlyFire) Untested.
  19. addEventHandler("onClientPlayerDamage", localPlayer, function() if getPlayerTeam(localPlayer) and getTeamName == "Team Name" then cancelEvent() else return false end end ) Untested.
  20. A. You give a big bullsh*t. Q. Can you touch your nose with tongue?
  21. A. Because Anubhav name is for bullsh*ts only. (joke) Q. Is my server good enough? Chaos MTA Freeroam.......(I guess it is).
×
×
  • Create New...