-
Posts
2,947 -
Joined
-
Last visited
Everything posted by JR10
-
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
-
dont add the numbers in the script remove it.
-
can you show me the whole script? because where is the client defined where is the cost defined
-
what the ... first your fixing all vehicles 2- where is the cost defined use local vehicle = getPedOccupiedVehicle(client)
-
thats AG ADAM script why did u take it?
-
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)
-
No problem. you should say thanks to solidsnake too.
-
... and he didnt add the event in his first code he just named the function "beep".
-
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)
-
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())
-
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Admin" ) ) then thats how to check if the player is an admin
-
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
-
i edited my post and told you to do so then you replied , sorry
-
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:
-
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.
-
any warnings? any errors? did you remove the "1" from each getPlayerTeam
-
source is a account not a player logOut use a player so do this logOut(client)
-
i fixed it check it again and dont forget to remove the "1" near each getPlayerTeam
-
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
-
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.
-
ok iam sorry iam a bit tired but can you tell me what you want to do?
-
math.floor will make it like this 29
-
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.