Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. JR10

    Colorblips

    u just copied it f***cked up from here there is something wrong with getPlayerTeam using lua tags so you must remove those kw2 from your script
  2. JR10

    Colorblips

    dont add the numbers in the script remove it.
  3. JR10

    Problems

    can you show me the whole script? because where is the client defined where is the cost defined
  4. JR10

    Problems

    what the ... first your fixing all vehicles 2- where is the cost defined use local vehicle = getPedOccupiedVehicle(client)
  5. thats AG ADAM script why did u take it?
  6. wrong, addEventHandler ( "onPlayerJoin", getRootElement(), function() bindKey (keyPresser, "l", "down", VehicleLights ) end) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function() for index, player in pairs(getElementsByType("player")) do unbindKey (keyPresser, "l", "down", VehicleLights ) end end) keyPresser is not defined, you should addEventHandler ( "onPlayerJoin", getRootElement(), function() bindKey (source, "l", "down", VehicleLights ) end) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function() for index, player in pairs(getElementsByType("player")) do unbindKey (player, "l", "down", VehicleLights ) end end)
  7. No problem. you should say thanks to solidsnake too.
  8. ... and he didnt add the event in his first code he just named the function "beep".
  9. playSoundFrontEnd(hitPlayer, 5) should be playSoundFrontEnd(hitElement, 5) and before in your first code function beep ( ) playSoundFrontEnd ( 5 ) end did you add the event? like this? function beep ( ) playSoundFrontEnd ( 5 ) end addEvent("beep", true) addEventHandler("beep", root, beep)
  10. JR10

    Problems

    addEvent ( "checker",true) addEventHandler ( "checker", getRootElement(), function() local account = getPlayerAccount(client) if not account then return end local accountName = getAccountName(account) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then triggerClientEvent (client, "update",getRootElement()) end end) 1- removed the player and replaced it with client and removed it from the function 2- getAccountName(account) uses account not a player you already got the player's account "account" so getAccountName(account) 3- your triggerClientEvent will trigger for all players you should specify for who should it trigger like if you are showing a GUI when u trigger it and dont specify who would it trigger for all players will see the gui so triggerClientEvent ( "update",getRootElement()) should be triggerClientEvent (client, "update",getRootElement())
  11. JR10

    Colorblips

    yes so it wotn be like "kw2"
  12. JR10

    Problems

    if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Admin" ) ) then thats how to check if the player is an admin
  13. JR10

    Colorblips

    try this function onResourceStart ( resource ) for id, player in ipairs( getElementsByType ( "player" ) ) do if getPlayerTeam1(player) ~= nil then local r, g, b = getTeamColor(getPlayerTeam1(player)) createBlipAttachedTo ( player, 0, 2, r,g,b ) else elseif ( players[player] ) then createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( player, 0, 2, color[1], color[2], color[3] ) end end end function onPlayerSpawn ( spawnpoint ) if getPlayerTeam1(player) ~= nil then local r, g, b = getTeamColor(getPlayerTeam1(player)) createBlipAttachedTo ( player, 0, 2, r,g,b ) else elseif ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end
  14. JR10

    Problems

    i edited my post and told you to do so then you replied , sorry
  15. JR10

    Problems

    function spawnHere() spawnPlayer (source, x, y, z, 0, math.random (1,288), 0, 0) end addEvent("spawnHere",true) you forgot addEventHandler function spawnHere() spawnPlayer (source, x, y, z, 0, math.random (1,288), 0, 0) end addEvent("spawnHere",true) addEventHandler("spawnHere", root, spawnHere) also function spawnHere() spawnPlayer (source, x, y, z, 0, math.random (1,288), 0, 0) end addEvent("spawnHere",true) addEventHandler("spawnHere", root, spawnHere) where is the source and x, y, z are defined change source to client and define x, y, z function spawnHere() local x, y, z = coordX, coordY, coordZ spawnPlayer (client, x, y, z, 0, math.random (1,288), 0, 0) end addEvent("spawnHere",true) addEventHandler("spawnHere", root, spawnHere) and ofc change coordX,Y,Z to your coordinates. if this didnt work change the name of the event of the function so they are not the same. good luck. EDIT:
  16. JR10

    Colorblips

    hmm i dont know but you can just set a timer that will get the player name tag color and set the blip color to it.
  17. JR10

    Colorblips

    any warnings? any errors? did you remove the "1" from each getPlayerTeam
  18. JR10

    Problems

    source is a account not a player logOut use a player so do this logOut(client)
  19. JR10

    Colorblips

    i fixed it check it again and dont forget to remove the "1" near each getPlayerTeam
  20. JR10

    Problems

    there is a function called logOut so you cant use it on your custom functions change your logOut function name and event and post the line 173 i think its because what i said you cant name a function the same name as a function that already exists
  21. JR10

    Colorblips

    you want to make the players blip color as his team color if one exists right? You can put this function onResourceStart ( resource ) for id, player in ipairs( getElementsByType ( "player" ) ) do if getPlayerTeam1(player) ~= nil then local r, g, b = getTeamColor(getPlayerTeam1(player)) createBlipAttachedTo ( player, 0, 2, r,g,b ) elseif ( players[player] ) then createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( player, 0, 2, color[1], color[2], color[3] ) end end end function onPlayerSpawn ( spawnpoint ) if getPlayerTeam1(player) ~= nil then local r, g, b = getTeamColor(getPlayerTeam1(player)) createBlipAttachedTo ( player, 0, 2, r,g,b ) elseif ( players[source] ) then createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] ) else createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] ) end end you will find "1" near each getPlayerTeam remove it.
  22. ok iam sorry iam a bit tired but can you tell me what you want to do?
  23. math.floor will make it like this 29
  24. JR10

    Problems

    there is a logOut function already so change its name also the event change its name and dont make the events same name as functions.
×
×
  • Create New...