Jump to content

Walid

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Walid

  1. You need to call bone_attach resource like this: function onGivePlayerPizzaBox (player) if (not isElement(player)) then return end if isPedInVehicle (player) then return end local pname = getPlayerName(player) if not (pname == "[sR]PlayAkoya") then outputChatBox("Du bist nicht befugt den Test Command zu nutzen!", player, 200, 0, 0) return end burger = createObject(2880, 0, 0, 0) setElementDimension(burger, getElementDimension (player)) export.bone_attach:attachElementToBone(burger, player, 12, 0, 0, 0, 0, -90, 0) outputChatBox("Debug: PIZZA FIXSIERT!",player, 200, 200, 0) end addCommandHandler("pizza", onGivePlayerPizzaBox)
  2. All what you need is: setTimer() getElementsByType() getPlayerIdleTime() setElementAlpha()
  3. Try to use sth like this : local db = dbConnect("sqlite", "databaseName.db") -- Put your database here. function getNewID() local result = dbPoll(dbQuery(db, "SELECT ID FROM YourTable ORDER BY ID ASC"), -1) newID = false for i, id in pairs (result) do if id["ID"] ~= i then -- ID column newID = i break end end if newID then return newID else return #result + 1 end end
  4. Don't follow him he already gave you a bad example. you need to replace client with source . the source of this event onPlayerSpawn is the player that just spawned.
  5. Walid

    Damage sound

    let him learn from his mistakes. he can find every thing here : playSound
  6. Walid

    Damage sound

    wrong Argument you dont need to use player just put it like this local sound = playSound("hit.mp3") setSoundVolume(sound, 0.5)
  7. Walid

    GTA 3 img block

    You can find every thing here: https://wiki.multitheftauto.com/wiki/Anti-cheat_guide
  8. check my tut here : LUA Strings
  9. Walid

    Help-Hud

    replace onClientRender with onClientHUDRender. setPlayerHudComponentVisible()
  10. Walid

    F11 Map replacement

    only local player can see it
  11. Walid

    F11 Map replacement

    you can replace it from your /Multi Theft Auto 1.5/MTA/cgui/images/ folder
  12. Walid

    Help script

    Code 1: function rewardTimer() local skinId = getElementModel(source) if not skinId == 201 then return end Timer = setTimer ( rewardOnRun, 100, 1,source ) givePlayerMoney (source, 1000 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), rewardTimer ) or function rewardTimer (_,_,_,_,_,skin) if not tonumber(skin) == 201 then return end Timer = setTimer ( rewardOnRun, 100, 1,source ) givePlayerMoney (source, 1000 ) end addEventHandler ( "onPlayerSpawn", getRootElement(),rewardTimer)
  13. Walid

    Help script

    Remove local here local Timer = setTimer ( rewardOnRun, 100, 1,player )
  14. because you are checking the player stats only onClientResourceStart just try to add a commandHandler. Example function functionName() triggerServerEvent ("onGetPlayerRaceStats", localPlayer) end addCommandHandler("stats",functionName Try now and it will update the player stats everytime you use the stats command.
  15. Walid

    Custom Titles

    You create all of this and you can't fix it lol , leacked resource.
  16. Walid

    Scripting help

    You can find every thing here :Wiki page Yes you can do it. try to do it by yourself then post your code here.
  17. you need to use guiSetEnabled() -- Example function functionName (vipPlayer) if (vipPlayer) then guiSetEnabled (yourButtonHere, false ) else guiSetEnabled (yourButtonHere, true ) end end
  18. check this RESTRICTING ACCESS TO WEB PAGES
  19. function FunctionName(playerSource) local playerAccount = getPlayerAccount(playerSource) if playerAccount and not isGuestAccount(playerAccount) then if getAccountData(playerAccount,"vip") then triggerClientEvent(playerSource,"checkVipPlayer",playerSource) end end end addCommandHandler("vip",FunctionName) then do what you want on the client side.
  20. Walid

    [HELP] VIP

    replace playerSource with root (triggerClientEvent).
  21. it should be like this function testt ( playerSource, commandName ) local text = "You text here" triggerClientEvent (playerSource, "test",playerSource, text) end addCommandHandler ( "test", testt ) only who type the command can see it.
  22. try to do it by yourself then post your code here
  23. Walid

    [HELP] VIP

    ah sorry i forgot to change the function name to nyanCommand. -- from addCommandHandler ( "fools", foolsCommand ) --To addCommandHandler ( "fools", nyanCommand ) that's all -- Server side function nyanCommand ( playerSource, commandName ) local acc = getPlayerAccount (playerSource) if acc and not isGuestAccount(acc) then local accName = getAccountName (acc ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then local theTriggerer = getPlayerName ( playerSource ) if commandName == "nyan" then triggerClientEvent (playerSource, "playMusicEvent", playerSource,"nyan" ) outputChatBox ( theTriggerer .. "#E45800 Is a Nyan Cat !", getRootElement(), 255, 255, 255, true ) elseif commandName == "fools" then triggerClientEvent (playerSource, "playMusicEvent", playerSource,"fools" ) outputChatBox ( theTriggerer .. "#E45800 Is Killing Fools!", getRootElement(), 255, 255, 255, true ) end end end end addCommandHandler ( "nyan", nyanCommand ) addCommandHandler ( "fools", nyanCommand) -- Client side function playMusic (songName) if sound and isElement(sound) then stopSound(sound) end if songName == "nyan" then sound = playSound("Nyan.mp3") elseif soungName == "fools" then sound = playSound("Killingfools.mp3") end setSoundVolume(sound, 1) end addEvent("playMusicEvent", true ) addEventHandler("playMusicEvent", getRootElement(), playMusic )
×
×
  • Create New...