Jump to content

Walid

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Walid

  1. Walid

    cancel death

    no, (server side)
  2. After deleting the playerAccount from your database you need to remove it also from the GridList So you need sth like this local row = guiGridListGetSelectedItem(GridList) if not row or row == -1 then return end guiGridListRemoveRow(GridList, row)
  3. lol i already gave you the solution but i think you want me to do it for you anyways this how you can do it : addCommandHandler("setlvl", function(player, cmd, playerToAdd, amount) local account = getPlayerAccount ( player) if account and isGuestAccount(account) then local accountName = getAccountName (account) if isObjectInACLGroup ( "user." ..accountName, aclGetGroup ( "Admin" )) then local playerToAdd = getPlayerFromPartialName(playerToAdd) if (isElement(playerToAdd)) then local playerAccount = getPlayerAccount(playerToAdd) if tonumber(amount) then setAccountData(playerAccount, "lvl" , tonumber(amount)) outputChatBox("I-ai setat lvl lui "..getAccountName(playerAccount).." la "..amount ,player,0,255,0) end else outputChatBox("No player with that name", player, 255, 0, 0) end end end end ) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end Syntax : /setlvl
  4. Try to use getPlayerFromPartialName if you don't know how post here again. function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end
  5. Simply because it's a local variable. Remove the word local. or you can use sth like this function createFlagMarker(x, y, z, r, g, b) if x and y and z then if not r or not g or not b then r, g, b = 255, 255, 255 end local one = createMarker(x, y, z, "cylinder", 1.5, r, g, b) addEventHandler( "onMarkerHit", one, MarkerHit ) end end addEvent("createFlagMarker", true) addEventHandler("createFlagMarker", root, createFlagMarker) function createFlag(id, x, y, z, rx, ry, rz) local two = createObject ( id, x, y, z, rx, ry, rz ) end addEvent("createFlag", true) addEventHandler("createFlag", root, createFlag) function MarkerHit( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType( hitElement ) == "player" then outputChatBox("Works", hitElement, 255, 255, 0 ) end end
  6. there is nothing wrong in your code just try to call it from an other server side. Example: function createFlagMarker(x, y, z, r, g, b) if x and y and z then if not r or not g or not b then r, g, b = 255, 255, 255 end createMarker(x, y, z, "cylinder", 2, r, g, b) end end addEvent("createFlagMarker", true) addEventHandler("createFlagMarker", root, createFlagMarker) From an other resource (server side) use this : exports.ctfSys:createFlagMarker(2003.61475, 1543.82678, 13.59075)
  7. lol the function server side and u want to call it from the client side ???? you need to use triggerServerEvent.
  8. i recommend you to read this : Wiki Page. i don't know What are you trying to do there is many things wrong in your code try this: local screenWidth,screenHeight = guiGetScreenSize() addEventHandler("onClientResourceStart",resourceRoot, function () panel = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'hatter.png', false) keszit = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'keszit.png', false) valaszolo = guiCreateStaticImage ( screenWidth/2 - 50, 300, 850, 550, 'Valaszolo.png', false) guiWindowSetSizable(panel, false) guiSetAlpha(panel, 1.00) guiSetVisible(panel, false) ticketlista = guiCreateGridList(5, 90, 600, 300, false, panel) -- Buttons olvas = guiCreateButton (600,50,600,350,"",false,panel) valaszol = guiCreateButton(600,190,250,95,"",false,panel) torol = guiCreateButton (600,300,250,80,"",false,panel) kuld = guiCreateButton (5,400,230,85,"",false,panel) bezar = guiCreateButton(600,400,220,90,"",false,panel) bezar1 = guiCreateButton(600,400,220,90,"",false,keszit) -- Events addEventHandler("onClientGUIClick", bezar, kuldes,false) addEventHandler("onClientGUIClick", bezar1, bezarom,false) end ) addCommandHandler("tutoka2", function () guiSetVisible(panel,true) guiSetVisible(keszit,false) guiSetVisible(valaszolo,false) showCursor(true) end) function kuldes () guiSetVisible(valaszolo,false) guiSetVisible(panel,false) guiSetVisible(keszit,true) showCursor(true) end function bezarom () guiSetVisible(panel, false) guiSetVisible(keszit, false) showCursor(false) end
  9. Walid

    Help

    Explain your problem better
  10. local markers = { [1] = {1642.79126, -2238.50684, 12.4969}, [2] = {1674.19836, 1448.01843, 9.7}, [3] = {-1421.77917, -287.76422, 13.14844}, [4] = {1633.95, 1831.68, 9.82}, } for i=1, #markers do local x , y , z = markers[i][1], markers[i][2], markers[i][3] local Marker = createMarker(x , y , z,"cylinder",1.3,190,180,30,170) addEventHandler ("onClientMarkerHit",Marker,MarkerHit) end function MarkerHit(hitPlayer,matchingDimension) guiSetVisible (window,true) showCursor (true) end
  11. Use AclGroups Example local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get the player account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- your code here end
  12. it should be like this function respawnDeadPlayer() setPedAnimation(source, CRACK, crckdeth1, 9000, true) outputChatBox("Vous êtes mort, vous allez respawn..",source,255,0,0) fadeCamera(source, false, 7) setTimer(respawnPlayerAfterDied, 10000, 1,source) end addEventHandler("onPlayerWasted", root, respawnDeadPlayer) function respawnPlayerAfterDied(p) spawnPlayer(p, 1173.197265625, -1323.5419921875, 15.395062446594) fadeCamera(p, true, 5) outputChatBox("Vous avez respawn, bon jeu!",p,255,0,0) end
  13. do you call this TUT ? sorry nah
  14. You need to use guiSetText()
  15. destroyElement(vehN) vehN it's not defined in your code.
  16. delete them all from your ACL.xml file
  17. function FunctionName() if (isPlayerMapVisible()) then -- dxDrawText here end end addEventHandler("onClientRender", root, FunctionName)
  18. Walid

    Small problem

    function ping ( player, command ) local name = getPlayerName ( player ) local ping = getPlayerPing ( player ) outputChatBox( name.."'s ping is"..ping.."!", player, 255, 255, 0, false ) end addCommandHandler ( "ping", ping )
×
×
  • Create New...