Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. outputChatBox(getPlayerName(source)"Money System Has Give Him".. reward.."$", root,255,255,0) you forgot this (..) after getPlayerName(source) also you put (else) without (if)
  2. addEvent("giveMoney", true ) addEventHandler("giveMoney", root, function() local reward = math.random(10,100) givePlayerMoney(source,reward) outputChatBox(getPlayerName(source).." Money System Has Give Him".. reward.."$", root,255,255,0) end) addEvent("showMoney", true ) addEventHandler("showMoney", root, function() outputChatBox(getPlayerName(source).." Has Money is $"..getPlayerMoney(source).."!",root,255,255,0) end)
  3. -- Client Side -- local spam = false GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(470,264,608,378,"Money_System By Dev-PoinT",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Image[1] = guiCreateStaticImage(219,20,116,124,"images/money.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(37,238,129,91,"images/yes.png",false,GUIEditor_Window[1]) GUIEditor_Image[3] = guiCreateStaticImage(421,247,129,79,"images/no.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(41,339,196,18,"Yes To Show Your Money",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(410,340,158,15,"No To Hide The Window",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Button[1] = guiCreateButton(195,174,173,36,"Give Me Money",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"clear-normal") addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Image[2] then if spam then outputChatBox("You have to wait 30 sec",255,0,0) return end local sound = playSound("sounds/cash.mp3") setSoundVolume(sound, 0.5) triggerServerEvent ("showMoney", localPlayer) spam = true setTimer(function() spam = false end,30000,1) elseif source == GUIEditor_Image[3] then guiSetVisible(GUIEditor_Window[1],false) end end) addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Button[1] then triggerServerEvent ("giveMoney", localPlayer) end end) -- Server Side -- addEvent("giveMoney", true ) addEventHandler("giveMoney", root, function() local reward = math.random(10,100) givePlayerMoney(source,reward) end)
  4. TAPL

    pls fix bug

    dude it's client side while this means localPlayer ! if you want can fire then change false to true like this toggleControl("fire", true)
  5. No, it's real, there an free hosting (web site), also serverffs offer free gameserver for 3 hours
  6. TAPL

    pls fix bug

    addCommandHandler("unfire", function () toggleControl("fire", false) end)
  7. TAPL

    fast question

    in race resource open the file (_common.lua) and remove line 81 and 82 and 83 and 84 done.
  8. TAPL

    pls fix bug

    another solution for what!!! We don't understand what you're trying to do. Explain what you want so we can help you.
  9. try this (not tested) local spam = false GUIEditor_Window = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(501,267,593,287,"Show My Money By Dev-PoinT",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Image[1] = guiCreateStaticImage(239,17,97,112,"images/money.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(109,165,136,98,"images/yes.png",false,GUIEditor_Window[1]) GUIEditor_Image[3] = guiCreateStaticImage(385,159,147,96,"images/no.png",false,GUIEditor_Window[1]) addEventHandler('onClientGUIClick',root, ---- the Gui event for if you click the imgaes then ... function() if source == GUIEditor_Image[2] then if spam then outputChatBox("You have to wait 30 sec",255,0,0) return end triggerServerEvent ("showMoney", localPlayer) --- trigger it to server side spam = true setTimer(function() spam = false end,30000,1) elseif source == GUIEditor_Image[3] then guiSetVisible(GUIEditor_Window[1],false) end end )
  10. client side GUIEditor_Window = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(501,267,593,287,"Show My Money By Dev-PoinT",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Image[1] = guiCreateStaticImage(239,17,97,112,"images/money.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(109,165,136,98,"images/yes.png",false,GUIEditor_Window[1]) GUIEditor_Image[3] = guiCreateStaticImage(385,159,147,96,"images/no.png",false,GUIEditor_Window[1]) addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Image[2] then triggerServerEvent ("showMoney", localPlayer) elseif source == GUIEditor_Image[3] then guiSetVisible(GUIEditor_Window[1],false) end end ) server side addEvent("showMoney", true ) addEventHandler("showMoney", root, function() outputChatBox(getPlayerName(source).." Has Money is $"..getPlayerMoney(source).."!",root,255,255,0) end)
  11. you can try something like this addEventHandler("onClientPedDamage",root, function () if not getElementData(source,"zombie") then cancelEvent() end end)
  12. ~_~ local vehicles = {} function spawnVeh(model) local x, y, z = getElementPosition(source) local rot = getPedRotation(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle (model, x, y, z, 0, 0, rot) warpPedIntoVehicle(source,vehicles[source]) end addEvent("onGUIClick",true) addEventHandler("onGUIClick",root,spawnVeh) addEventHandler("onPlayerQuit",root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end)
  13. fbi1 = createVehicle ( 596, -2429.7998046875, 515.2998046875, 29.700000762939, 0, 0, 215.99670410156 ) fbi2 = createVehicle ( 596, -2425.69921875, 518.5, 29.700000762939, 0, 0, 221.99523925781 ) fbi3 = createVehicle ( 596, -2422.3994140625, 521.599609375, 29.700000762939, 0, 0, 225 ) function lockfbi(player, seat, jacked) if (source == fbi1 or source == fbi2 or source == fbi3) then if (seat == 0) then if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FBI" or "Admin")) then cancelEvent() outputChatBox ( "Only FBI can enter this vehicle", player, 0, 0, 150, true ) end end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockfbi )
  14. try this function getNearbyVehicles(thePlayer, commandName) if (exports.global:isPlayerAdmin(thePlayer)) then outputChatBox("Nearby Vehicles:", thePlayer, 255, 126, 0) local count = 0 for index, nearbyVehicle in ipairs( exports.global:getNearbyElements(thePlayer, "vehicle") ) do local thisvehid = getElementData(nearbyVehicle, "dbid") local vehicleID = getElementModel(nearbyVehicle) local vehicleName = getVehicleNameFromModel(vehicleID) local owner = getElementData(nearbyVehicle, "owner") local faction = getElementData(nearbyVehicle, "faction") count = count + 1 local ownerName = "" if (tonumber(faction) > 0) then local theTeam = exports.pool:getElement("team", faction) if theTeam then ownerName = getTeamName(theTeam) end elseif (owner==-1) then ownerName = "Admin" elseif (owner>0) then ownerName = exports['cache']:getCharacterName(owner) else ownerName = "Civilian" end if (thisvehid) then outputChatBox(" " .. vehicleName .. " (" .. vehicleID ..") with ID: " .. thisvehid .. ". Owner: " .. ownerName, thePlayer, 255, 126, 0) elseif not (thisvehid) then outputChatBox(" " .. "*Temporary* " .. vehicleName .. " (" .. vehicleID ..") with ID: " .. thisvehid .. ". Owner: " .. ownerName, thePlayer, 255, 126, 0) end end if (count==0) then outputChatBox(" None.", thePlayer, 255, 126, 0) end end end addCommandHandler("nearbyvehicles", getNearbyVehicles, false, false)
  15. local vehicles = {} function spawnVeh(model) local x, y, z = getElementPosition(source) local rot = getPedRotation(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end local vehicles[source] = createVehicle (model, x, y, z, 0, 0, rot) warpPedIntoVehicle(source,vehicles[source]) end addEvent("onGUIClick",true) addEventHandler("onGUIClick",root,spawnVeh) addEventHandler("onPlayerQuit",root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end)
  16. TAPL

    Question

    break is for stop-finish-end loop http://www.lua.org/pil/4.4.html
  17. local spam = { } local uTimers = { } local setting = get( "kick" ) function onChat ( message, messageType ) spam[ source ] = tonumber( spam[ source ] or 0 ) + 1 if spam[ source ] == 3 then outputChatBox( "Warning - Do Not Spam! ",source,255,0,0 ) elseif spam[ source ] > 5 then if setting == "true" then outputChatBox( "Kicking " .. getPlayerName(source) .. " For Flooding The Chat! 5 Times !",root,255,0,0 ) kickPlayer( source,"You Have Been Kicked For Flooding! 5/5" ) elseif setting == "false" then setPlayerMuted( source,true ) outputChatBox( getPlayerName(source) .. " Has Been Auto Muted [20 sec]",root,255,0,0 ) if isTimer( uTimers[ source ] ) then killTimer( uTimers[ source ] ) end uTimers[ source ] = setTimer(setPlayerMuted,20000,1,source,false ) setTimer(outputChatBox,20000,1,"You Have Been unMuted Dont Try Spam!",source,255,255,0) end end end addEventHandler ( "onPlayerChat", root, onChat) function quitPlayer( ) spam[ source ] = nil uTimers[ source ] = nil end addEventHandler ( "onPlayerQuit", root, quitPlayer ) function active() outputChatBox(".:[ Anti Flood | #FFFF1ABy E ]:.",root,0,255,0,true) end addEventHandler("onResourceStart", resourceRoot, active)
  18. Server - Syntax 2 (https://wiki.multitheftauto.com/wiki/BindKey) bindKey ( player thePlayer, string key, string keyState, string commandName, string arguments ) (Wrong) خطأ bindKey ( "j" , "buyJetPack") (Correct) التصحيح bindKey(source,"j","down",buyJetPack) function buyJetPack(player) if not doesPedHaveJetPack(player) then givePedJetPack(player) else removePedJetPack(player) end end
  19. Solidsnake14 الكود لـ --Server side viewtopic.php?f=91&t=40571#p411826
  20. TAPL

    sreen_money

    by micro ? micro big stealer
  21. bindKey ( "j" , "buyJetPack") unbindKey ( "j" , "buyJetPack") هههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههه
  22. function kemo(player) if hasObjectPermissionTo(player, "function.setPlayerMuted", false) then for i=1,30 do outputChatBox("ممنوع التكرار", root, 255, 0, 0, true) end outputChatBox("مود القوانين من صنع كيمو", root, 255, 0, 0, true) end end addCommandHandler("rules", kemo)
  23. TAPL

    Big problem

    put infernuses model id in the table 3 times
  24. TAPL

    Big problem

    this is not problem, you can save all vehicles models in table and set them in AccountData using toJSON and fromJSON toJSON fromJSON
  25. also change source to getLocalPlayer() and outputChatBox in Client don't required element so remove source from it
×
×
  • Create New...