Jump to content

Tekken

Helpers
  • Posts

    1,413
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Tekken

  1. It’s simple: local name = getTeamName(team); if name == "1" then -- do something elseif name == "2" then -- do something else else -- do something else else.. end And so on and so forth. This is just an idea you can make it even better with tables and stuff much faster/better.
  2. First of all you should move the getPlayetTeam after the getElementType function so you make sure it's a player: This should do it: addEventHandler("onColShapeHit", group, function(hitElement) if getElementType(hitElement) == "player" then local team = getPlayerTeam(hitElement) or false; local CN = getElementData(source, "name"); --?? for i = 1, #C do if source == C[i] then if team then outputChatBox(getTeamName(team), hitElement, 255, 0, 0, true); end end end end end);
  3. Tekken

    String

    He wanted to somehow convert a string to an already existing variable that was storing an element, I have told him on pm that’s not possible, he made this topic as yesterday night I didn’t answered at time. For now it’s fixed.
  4. Hello guys, does anyone know how can I remove only the 3 big cities of San Andreas ?
  5. Tekken

    [HELP] AdminTag

    my bad function onClientRender() local cx, cy, cz, lx, ly, lz = getCameraMatrix(); for k, player in pairs(g_StreamedInPlayers) do if isElement(player) and isElementStreamedIn(player) then local cargo_player = getElementData(player, "cargo") or ""; if cargo_player and cargo_player ~= "" then local vx, vy, vz = getPedBonePosition(player, 8); local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz); if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then local x, y = getScreenFromWorldPosition(vx, vy, vz + 0.3); if x and y then local name = getPlayerName(player); local w = dxGetTextWidth(name, 1, "default-bold"); local h = dxGetFontHeight(1, "default-bold"); local cargo_player_cor = getElementData(player, "cargo->cor") or {255, 255, 255, 240}; dxDrawText(cargo_player..": "..name, x - 1 - w / 2, y - 1 - h - 40, w, h, tocolor(0, 0, 0), 2, "default-bold"); dxDrawColorText(cargo_player..": "..name, x - w / 2, y - h - 40, w, h, tocolor(unpack(cargo_player_cor)), 2, "default-bold"); end end end end else table.remove(g_StreamedInPlayers, k); end end addEventHandler("onClientRender", root, onClientRender);
  6. Tekken

    [HELP] AdminTag

    function onClientRender() local cx, cy, cz, lx, ly, lz = getCameraMatrix(); for k, player in pairs(g_StreamedInPlayers) do if isElement(player) and isElementStreamedIn(player) then local cargo_player = getElementData(player, "cargo") or ""; if cargo_player and cargo_player ~= "" then local vx, vy, vz = getPedBonePosition(player, 8); local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz); if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then local x, y = getScreenFromWorldPosition(vx, vy, vz + 0.3); if x and y then local name = getPlayerName(player); local w = dxGetTextWidth(name, 1, "default-bold"); local h = dxGetFontHeight(1, "default-bold"); local cargo_player_cor = getElementData(player, "cargo->cor") or {255, 255, 255, 240}; dxDrawText(cargo_player, x - 1 - w / 2, y - 1 - h - 40, w, h, tocolor(0, 0, 0), 2, "default-bold"); dxDrawColorText(cargo_player, x - w / 2, y - h - 40, w, h, tocolor(unpack(cargo_player_cor)), 2, "default-bold"); end end end end else table.remove(g_StreamedInPlayers, k); end end addEventHandler("onClientRender", root, onClientRender); try this
  7. Tekken

    [HELP] AdminTag

    with the function I gave you what does it happen?
  8. Tekken

    [HELP] AdminTag

    Isn't that what you want?
  9. Tekken

    [HELP] AdminTag

    Use this for setCargo function function setCargo(player) if player then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Kurucu")) then setElementData(player, "cargo", "Sunucu Yazılımcısı") setElementData(player, "cargo->cor", {255, 0, 0, 240}) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("SuperAdmin")) then setElementData(player, "cargo", "Süper ADMİN") setElementData(player, "cargo->cor", {255, 0, 0, 240}) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then setElementData(player, "cargo", "Admin") setElementData(player, "cargo->cor", {255, 0, 0, 240}) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Rehber")) then setElementData(player, "cargo", "Sunucu Rehberi") setElementData(player, "cargo->cor", {255, 100, 0, 240}) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("SuperModerator")) then setElementData(player, "cargo", "Süper Moderatör") setElementData(player, "cargo->cor", {158, 255, 39}) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Moderator")) then setElementData(player, "cargo", "Moderatör") setElementData(player, "cargo->cor", {255, 255, 0, 240}); else setElementData(player, "cargo", "") setElementData(player, "cargo->cor", {255, 255, 255, 255}); end end end
  10. Tekken

    [HELP] AdminTag

    Let me get on the pc
  11. Tekken

    [HELP] AdminTag

    I’d suggest you tu use a table to store duty status of admin rather than acl
  12. Tekken

    [HELP] AdminTag

    What is the problem then?
  13. Tekken

    [HELP] AdminTag

    Replace or nil; with or ""; as nil can’t be concatenate nil = nothing.(you can’t do something with nothing)
  14. Tekken

    [HELP] AdminTag

    SetCargo function at the bottom you should add else setElementData(player, "cargo", "")
  15. Tekken

    [HELP] AdminTag

    There might be something wrong with "cargo" element data ?
  16. You want to COPY a server resources from what I can understand and this is illegal and we don't allow it!
  17. Tekken

    random spam

    You use newnr if it's not the same as the lastnr if it is the same you just redo math.random to have a different one
  18. Tekken

    random spam

    at the top of your script add this math.randomseed(getTickCount()); This will make it so the resource won't output the same random numbers every time it's restarted!
  19. Tekken

    random spam

    You mean it outputs two times the same number in a row? If so you can store the old number in a variable and check if is the same or not and store the number in var again. Something like this: local lastnr = math.random(0, 9); function generatenr() local newnr = math.random(0, 9); if newnr ~= lastnr then print(newnr); lastnr = newnr; --overwrite old nr else generatenr();--recall function if the same nr end end
  20. You want to have multiple weapons on the back at the same time?
  21. Tekken

    Colshape

    You just replace « true/false » with a table or a number or a string or anything you need.
  22. Tekken

    [AJUDA/HELP]

    What do you mean? When you die they’re still in inventory ? In your dead ped inventory or in the new spawned one?
  23. Decrease iK_v each time the script runs ? Until it becomes 0 and then stop?
  24. Exactly what I gave you from the beginning ! Glad I could help
×
×
  • Create New...