-
Posts
1,423 -
Joined
-
Last visited
-
Days Won
19
Everything posted by Tekken
-
onPlayerQuit has an argument quitType you can check if quitType == "Kicked" and dbExec after ?
-
[Help/Bug?] CreatePed are invincible /w slothbot
Tekken replied to PiscioMastella's topic in Scripting
@Bean666 might want to add <oop>true</oop> to meta.xml to make sure that works -
Hello, I’ve moved your topic to scripting section for best results! I cannot understand your question will you please develop?
-
[Help/Bug?] CreatePed are invincible /w slothbot
Tekken replied to PiscioMastella's topic in Scripting
Hello and welcome! Will you please edit your topic and use the code tags <> for us to better understand your code? Greetings! -
Hello I’ve moved your topic to appropriate section! You need to set stats with https://wiki.multitheftauto.com/SetPedStat setPedStat(player, 77, 999) setPedStat(player, 78, 999) That will make it for AK47 and M4 Do this onPlayerSpawn/Join
-
https://wiki.multitheftauto.com/wiki/SetCameraMatrix That should do what you want, it will require some math though.
-
Your's is INSERT INTO `logging` SET name= 0, account= ?, type= ?, type2= ?, tick= ?, action= ?, serial= ? Notice the 0 for name where should be ?
-
Make controller = ped in dvo.load function
-
Change this: dvo.allowedElementType = { ["ped"] = true; } with this dvo.allowedElementType = { ["player"] = true, ["ped"] = true }
-
So you are trying to apply this only to PEDS and not PLAYERS, I'm I right ? And this is only working for you? And not for other clients?
-
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.
-
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);
-
Hello guys, does anyone know how can I remove only the 3 big cities of San Andreas ?
-
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);
-
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
-
with the function I gave you what does it happen?
-
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
-
I’d suggest you tu use a table to store duty status of admin rather than acl
-
Replace or nil; with or ""; as nil can’t be concatenate nil = nothing.(you can’t do something with nothing)
-
SetCargo function at the bottom you should add else setElementData(player, "cargo", "")
-
There might be something wrong with "cargo" element data ?