Jump to content

Zsoltisz

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by Zsoltisz

  1. debugscript :ERROR:Server triggered clientside event motor, but event is not added clientside
  2. No. Because I tested the client script with "addCommandHandler" and the sound is working. I think have problem with Event.
  3. Nothing. The sound isn't playing. And i dont got any error code. (meta.xml is good.)
  4. nothing. I replaced it but don't working
  5. Well. The sript: When i sit in car and i press J the car is start about 0,5 sec but the sound is played without timer. I do it. Don't working
  6. I dont hear nothing Here is the full code of server side elseif fuel >= 1 then triggerClientEvent(source,"start",source) toggleControl(source, 'brake_reverse', true) setTimer ( function() setVehicleEngineState(veh, true) exports['StarMTA_anticheat']:changeProtectedElementDataEx(veh, "engine", 1, false) exports.StarMTA_core:sendLocalMeAction(source, "beindította a jármű motorját.") end, 500, 1 )
  7. hello guys. I have a problem with this script. please help me whats the problem. client side: function motorhang() local motor = playSound("sounds/start.mp3") setSoundVolume(motor, 1) end addEvenet("motor") addEventHandler("motor",thePlayer,motorhang) server side: triggerClientEvent("start",source)
  8. Zsoltisz

    Admin logo

    Thats OK. But how can i put image upper my head? Player = getPedBonePosition(player, 6) tag = dxCreateTexture("Duty/Fejleszto_Duty.png") function Fejleszto_Duty() adminszolis = getElementData(targetPlayer, "adminduty") if (exports.StarMTA_core:Fejleszto(targetPlayer) == true and adminszolis == true or exports.StarMTA_core:Fejleszto(thePlayer) == true) then dxDrawImageOnElement(Player,tag) end end addEventHandler("onClientPreRender", root, Fejleszto_Duty)
  9. Zsoltisz

    Admin logo

    Ohh Thank you my friend. I understand. I type it for my script but i got error again...
  10. Zsoltisz

    Admin logo

    I need to add this picture for upper my head. So i can do it with BONE_HEAD2? Can you show me how, please?
  11. Zsoltisz

    Admin logo

    Yes. That's client side.
  12. Zsoltisz

    Admin logo

    Hello guys. Whats the problem with my script? prob: lua: source_file.lua:30: attempt to call global 'addEventHandler' (a nil value) imgW = 64 imgH = 64 function adminLogo() adminszolis = getElementData(targetPlayer, "adminduty") if (exports.StarMTA_core:Fejleszto(targetPlayer) == true and adminszolis == true or exports.StarMTA_core:Fejleszto(thePlayer) == true) then for i,player in ipairs() do if player ~= localPlayer then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player) hZ = hZ + 1.0 local pX,pY,pZ = getPedBonePosition(localPlayer) pZ = pZ + 1.0 if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) then local sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ) local relative = (50 - sD) / 50 if relative > 0 then local iW = imgW * relative local iH = imgH * relative local iX = sX - (iW / 2) local iY = sY - (iH / 2) dxDrawImage(iX, iY, iW, iH, "admin.png") end end end end end end addEventHandler("onClientRender", root, adminLogo)
  13. Zsoltisz

    Admin name

    Again error [2016-03-21 16:39:20] INFO: MYSQL ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near " at line 1 [2016-03-21 16:39:20] WARNING: admin-system/Player/s_player_commands.lua:793: Bad argument @ 'setPlayerName' [Expected string at argument 2, got boolean]
  14. Zsoltisz

    Admin name

    No. The getPlayerName is getting my actually name.
  15. Zsoltisz

    Admin name

    Dont working [2016-03-10 13:37:24] INFO: MYSQL ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1 [2016-03-10 13:37:24] WARNING: admin-system/Player/s_player_commands.lua:793: Bad argument @ 'setPlayerName' [Expected string at argument 2, got boolean]
  16. Zsoltisz

    Admin name

    Hello guys! I have this script. So, when i go in adminduty my name is changed to my account name. That's good. BUT. When i go out in adminduty my name is not changed to my character name. Please help for me! //Sorry for bad english. function adminDuty(thePlayer, commandName) if exports.global:isPlayerAdmin(thePlayer) then local id = getElementData(thePlayer, "playerid") local adminduty = getElementData(thePlayer, "adminduty") local username = getPlayerName(thePlayer) local adminnev = getElementData(thePlayer, "gameaccountusername") local karinev = mysql:query("SELECT charactername FROM characters WHERE charactername=") if (adminduty==0) then exports['anticheat-system']:changeProtectedElementDataEx(thePlayer, "adminduty", 1, false) setPlayerName (thePlayer, adminnev) outputChatBox("#66FF66[starMTA]#32C8FF " .. adminnev .. " #FFFFFFadminszolgálatba #66FF66lépett! #FFFFFFHasználd a #32C8FF/pm " .. id .." #FFFFFFparancsot, hogy írj neki!",getRootElement(), 255, 255, 255, true) elseif (adminduty==1) then local adminlevel = getElementData(thePlayer, "adminlevel") if (adminlevel == 2) then outputChatBox("#66FF66[starMTA-Admin]#FFFFFF1-es Admin nem léphet ki szolgálatból.", thePlayer, 255, 0, 0, true) return end exports['anticheat-system']:changeProtectedElementDataEx(thePlayer, "adminduty", 0, false) setPlayerName (thePlayer, karinev) outputChatBox("#66FF66[starMTA]#32C8FF " .. adminnev .. " #FF6666kilépett #FFFFFFaz adminszolgálatból!", getRootElement(), 255, 0, 0, true) end mysql:query_free("UPDATE accounts SET adminduty=" .. mysql:escape_string(getElementData(thePlayer, "adminduty")) .. " WHERE id = '" .. mysql:escape_string(getElementData(thePlayer, "gameaccountid")).."'" ) exports.global:updateNametagColor(thePlayer) end end addCommandHandler("adminduty", adminDuty, false, false)
  17. Hello guys! Please help for me! Error: [03:33:45] WARNING: brpExports\s_exports.lua:15: Bad argument @ 'getElementData' [Expected element at argument 1, got nil] [03:33:45] ERROR: brpExports\s_exports.lua:15: attempt to compare number with ni l --[[ Basic Roleplay Gamemode ~ Server-side functions for exported functions Created by Socialz ]]-- -- Miniatures local cRoot = getRootElement() local cThis = getThisResource() local cThisRoot = getResourceRootElement(cThis) -- Functions function isPlayerAdmin(player) return tonumber(getElementData(player, "admin.level")) > 1 end function isPlayerFullAdmin(player) return tonumber(getElementData(player, "admin.level")) > 2 end function isPlayerLeadAdmin(player) return tonumber(getElementData(player, "admin.level")) > 3 end function isPlayerHeadAdmin(player) return tonumber(getElementData(player, "admin.level")) > 4 end function getAdminLevel(player) return tonumber(getElementData(player, "admin.level")) end function isLoggedIn(player) return tonumber(getElementData(player, "player.loggedin")) > 0 end function getIDVehicle(vehicle) return tonumber(getElementData(vehicle, "vehicle.id")) end function isElementInRangeOfPoint(element, x, y, z, range) local px, py, pz = getElementPosition(element) return ((x-px) ^ 2 + (y-py) ^ 2 + (z-pz) ^ 2) ^ 0.5 <= range end function findPlayer(name, player) local matches = {} for i, v in ipairs(getElementsByType("player")) do if getPlayerName(v) == name then return v end local playerName = getPlayerName(v):gsub("#%x%x%x%x%x%x", "") playerName = playerName:lower() if playerName:find(name:lower(), 0) then table.insert(matches, v) end end if #matches == 1 then return matches[1] end return false end function isVehicleEmpty(vehicle) local passengers = getVehicleMaxPassengers(vehicle) if type(passengers) == 'number' then for seat = 0, passengers do if getVehicleOccupant(vehicle, seat) then return false end end end return true end function getPlayerFaction(player) return tonumber(getElementData(player, "factions.player")) end function isPlayerInFaction(player) return tonumber(getElementData(player, "factions.player")) > 0 end function isPlayerFactionLeader(player) return tonumber(getElementData(player, "factions.leader")) > 0 end function getVehicleFaction(vehicle) return tonumber(getElementData(vehicle, "factions.vehicle")) end function isVehicleInFaction(vehicle) return tonumber(getElementData(vehicle, "factions.vehicle")) > 0 end function doesPlayerOwnVehicle(vehicle, player) return getElementData(vehicle, "vehicle.owner") == getElementData(player, "accountname") end function isDepartmentRadioAllowed(faction) return getElementData(faction, "factions.type") == "law" or getElementData(faction, "factions.type") == "medical" or getElementData(faction, "factions.type") == "news" end function getFactionType(faction) return tostring(getElementData(faction, "factions.type")) end
×
×
  • Create New...