Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. -- Server Side -- function drop(player,cmd,amount) local x,y,z = getElementPosition(player) local weapon = getPedWeapon(player) local ammo = getPedTotalAmmo(player) local amount = tonumber(amount) if ammo >= amount then takeWeapon(player,weapon,amount) setElementID(createPickup(x,y+5,z,2,weapon,5000,amount),"WeaponPickUp") outputChatBox("*You Are Drop Successfuly",player,0,255,0,true) else outputChatBox("*You Don't Have "..amount..".",player,255,0,0,true) end end addCommandHandler("drop",drop) addEventHandler("onPickupHit", root, function(player) if getElementID(source) == "WeaponPickUp" then setTimer(destroyElement,50,1,source) outputChatBox("You Pickup Droped ammo..",player,150,0,255,true) end end)
  2. setTeamFriendlyFire Server-only function
  3. for _, team in ipairs(getElementsByType("team")) do if getTeamFriendlyFire(team) then setTeamFriendlyFire(team, false) end end
  4. TAPL

    Help plz

    Try function guiToggleVisible() if guiGetVisible(Panel) then addEventHandler("onClientRender", gRoot, HideWindow) showCursor(false) guiSetInputEnabled(false) guiSetVisible(Panel, false) guiSetVisible(PanelImage, false) if UserDataChanged then saveUserData() end UserDataChanged = nil else refreshPanelData(localPlayer) guiSetVisible(Panel, true) guiSetVisible(PanelImage, true) showCursor(true) guiSetInputEnabled(true) addEventHandler("onClientRender", gRoot, ShowWindow) guiGridListClear(PlayersListGUI) for id, playeritem in ipairs(getElementsByType("player")) do if playeritem ~= localPlayer then local row = guiGridListAddRow(PlayersListGUI) guiGridListSetItemText ( PlayersListGUI, row, playerListColumnGUI, string.gsub(getPlayerName(playeritem),"#%x%x%x%x%x%x",""), false, false) end end end end
  5. TAPL

    Help plz

    could you show function ShowWindow and function HideWindow and where the hell PanelOpened come from
  6. TAPL

    Help plz

    Try function guiToggleVisible ( ) if not PanelOpened then PanelOpened = 1 if guiGetVisible ( Panel ) == true then addEventHandler ( "onClientRender", gRoot, HideWindow) showCursor ( false ) guiSetInputEnabled ( false ) guiSetVisible ( Panel, false ) guiSetVisible ( PanelImage, false ) if UserDataChanged then saveUserData() end UserDataChanged = nil else refreshPanelData(getLocalPlayer()) guiSetVisible ( Panel, true ) guiSetVisible ( PanelImage, true ) showCursor ( true ) guiSetInputEnabled ( true ) addEventHandler ( "onClientRender", gRoot, ShowWindow) guiGridListClear ( PlayersListGUI ) for id, playeritem in ipairs(getElementsByType("player")) do if playeritem == getLocalPlayer() then else local row = guiGridListAddRow ( PlayersListGUI ) guiGridListSetItemText ( PlayersListGUI, row, playerListColumnGUI, string.gsub(getPlayerName ( playeritem ),"#%x%x%x%x%x%x",""), false, false ) end end end end end
  7. TAPL

    Help plz

    These 3 lines doesn't help us to help you Show function guiToggleVisible
  8. TAPL

    Please help

    show full code.
  9. https://community.multitheftauto.com/ind ... ils&id=292
  10. TAPL

    Please help

    to set the skin you need to use setElementModel Server Side https://wiki.multitheftauto.com/wiki/SetElementModel
  11. What?
  12. أبحث هنا https://community.multitheftauto.com إذا ما لقيته أبدأ بتعلم البرمجة و سويه بنفسك https://wiki.multitheftauto.com/wiki/Scr ... troduction أو شف لك أحد يبرمجه لك بمقابل
  13. Admin acl ضيف ذا لـ "command.start" access="true">
  14. TAPL

    Resolution Help

    Delete the gta_sa.set file located in the GTA San Andreas User Files in your Documents folder/library (Windows Vista and 7 users) or My Documents directory (Windows XP users)
  15. TAPL

    طلب

    https://wiki.multitheftauto.com/wiki/OnClientGUIClick https://wiki.multitheftauto.com/wiki/TriggerServerEvent https://wiki.multitheftauto.com/wiki/GetPlayerMoney https://wiki.multitheftauto.com/wiki/TakePlayerMoney https://wiki.multitheftauto.com/wiki/GiveWeapon
  16. You don't need to make it server side. -- Client Side -- local door1marker = createMarker(2655, 2706, 411, "arrow", 1, 100, 20, 20) function door1markerhit(player) if getElementType(player) == "player" and player == localPlayer then guiSetVisible(keypadWindow,true) showCursor(true) setElementData(keypadWindow,"keypadID","GateKeypadCode") end end addEventHandler( "onClientMarkerHit", door1marker, door1markerhit)
  17. addEventHandler("onPlayerSpawn", rootElement, onPlayerSpawnHandler) if string.find(scriptString, "addEventHandler") then eventString = string.sub(scriptString, 18, #scriptString) end i think this will return "onPlayerSpawn", rootElement, onPlayerSpawnHandler)" try to fix it..
  18. https://wiki.multitheftauto.com/wiki/AddEventHandler eventName: the name of the event which triggered the handler function.
  19. TAPL

    Coordinates

    outputChatbox should be outputChatBox
  20. Dude start the script after creating the teams.
  21. An idiot upload my resource and copying my name. https://community.multitheftauto.com/index.php?p= ... ls&id=5348 https://community.multitheftauto.com/ind ... &id=331591 DONE
  22. You're welcome.
  23. You're welcome.
×
×
  • Create New...