Jump to content

Walid

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Walid

  1. Walid

    [HELP] Warning

    localPlayer is predefined variable ( returns the player element of the local player.) So using localPlayer / getLocalPlayer() is the same thing. I'm pretty sure arg2 is not defined in your code, post full code here.
  2. Wrong section. Click Me
  3. Walid

    [HELP] Warning

    Try this: -- Check here if arg2 exist then .... local bleeding = getElementData(arg2,"bleeding") or 0 local bandage = getElementData(localPlayer,"Bandage") or 0 if bleeding > 0 and bandage >= 1 then -- put your code here end
  4. Check if the vehicle exist then destroy it: if isElement(source) then destroyElement(source) end
  5. So I've tried different parameters but all with the same result! Try this local Team = createTeam("Medics", 0, 255, 0) function createAmb() local getpteam = getPlayerTeam(client) if (getpteam == Team) then outputChatBox ("Sorry, but you are already employed as a medic!", client) else createVehicle (416, 1191.3876953125, -1325.90234375, 13.3984375) setPlayerTeam(client, team) outputChatBox ("You are now employed as a Medic, enter an ambulance to start your job!", client,0,255,0) end end addEvent("ambul", true) addEventHandler("ambul", root, createAmb)
  6. Walid

    BindKey

    You are welcome
  7. Walid

    BindKey

    Try this untested i'm using the phone. -- Server side function gui (player) local account = getPlayerAccount(player) if account and not isGuestAccount(account) then local accName = getAccountName (account) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent (player,"pop",player) end end end function bindTab( thePlayer ) bindKey( thePlayer, "F2","down", gui) end function bindTabOnPlayerJoin () bindTab(source) end addEventHandler("onPlayerJoin",root, bindTabOnPlayerJoin) function bindTabOnResourceStart () local players = getElementsByType("player") for index, player in pairs(players) do bindTab(player) end end addEventHandler("onResourceStart",resourceRoot, bindTabOnResourceStart ) -- Client side -- Client side function popa () guiSetVisible(Wnd,true) showCursor(true) end addEvent("pop",true) addEventHandler("pop", root), popa )
  8. It's a dxGUI (dx rectangle) with normal edit box and buttons. Edit sorry didn't see Oscar reply.
  9. Already create something like that (Here), it's very easy to do it. Just try and post your code here.
  10. Walid

    Message ACL

    Do it by yourself then post your code here.
  11. I'm using attachElementToBone to right hands. While the player moves, the object moves also. I want to freeze right hand for the object don't moving. The left hand, legs, ... Have to move normally.
  12. Changing the whole map without without disabling F11, i think it's not a good idea. anyways -- delete all mta sa object for i=550,20000 do removeWorldModel(i,10000,0,0,0) end setOcclusionsEnabled(false) setWaterLevel(-5000) You need to be a good mapper to create your own one.
  13. Client side (just to daisable F11 map then added anything you want) function disableMap ( ) toggleControl("radar", false) end addEventHandler ( "onClientResourceStart", resourceRoot, disableMap )
  14. Yes it's toggleControl("radar", false) then do what you want. :fp:
  15. local civilian = createTeam("Civilian Workers",255,255,0) function Civilian (player) local playerTeam = getPlayerTeam(player) local wantedLevel = getPlayerWantedLevel (player) or 0 if not (playerTeam == civilian) then if wantedLevel == 0 then if isPedInVehicle(player) then outputChatBox("You can't use this command when inside a vehicle",player,255,0,0) return end outputChatBox("You are now a Civilian",player,0,255,0) setPlayerTeam(player,civilian) else outputChatBox("You are wanted",player,255,0,0) end else outputChatBox("You are already in Civilian Team",player,255,0,0) end end addCommandHandler("civilian",Civilian)
  16. Walid

    KIll all players

    replace "ped" with "player". and put your code server side.
  17. Walid

    Commands

    It's very simple it can be like this: Method 1: -- function A function functionA(player,cmd) outputChatBox("test A command",player) end addCommandHandler("testa",functionA) -- function B function functionB(player,cmd) outputChatBox("test B command",player) end addCommandHandler("testb",functionB) local functions = {functionA,functionB} for i,v in pairs(functions) do addCommandHandler("testc",v) end Method 2: function allfunctions(player,cmd) if cmd == "testa" then -- testa code here elseif cmd == "testb" then -- testb code here elseif cmd == "testc" -- testa code here -- testb code here end end addCommandHandler("testa",allfunctions) addCommandHandler("testb",allfunctions) addCommandHandler("testc",allfunctions)
  18. added player here it's server side code. outputChatBox("You have been caught escaping, you are jailed!",player, 255, 0, 0)
  19. Walid

    Commands

    Try it by yourself and post the code here.
  20. Try this local LSJob_in = createMarker(1727, -1637, 20.5, "arrow", 1, 0, 255, 0, 255) local LSJob_out = createMarker (1727, -1637.7, 20.5, "arrow", 1, 0, 255, 0, 255) function LSJobWarp(player) if (player and isElement(player) and getElementType(player) == "player") then if (source == LSJob_in) then local watedLevel = getPlayerWantedLevel (player) if watedLevel > 5 then return end setElementPosition(player, 1727, -1640.53, 20.2) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) elseif (source == LSJob_out) then setElementPosition(player, 1727, -1635, 20.2) setTimer(setElementFrozen, 2500, 1, player, true) outputChatBox("Come back again!", 0, 255, 0) end end end addEventHandler("onMarkerHit", root, LSJobWarp)
  21. Walid

    Commands

    @Codyl , What's this ???? you need to added the function name not a table.
×
×
  • Create New...