itHyperoX
Members-
Posts
522 -
Joined
-
Last visited
-
Days Won
1
Everything posted by itHyperoX
-
@iPrestege boss can u help me please?
-
Anyone can help me?
-
Trigger
-
are you talking about like this? local x = 1951.80859375 local y = -1875.513671875 local z = 13.646875 addEventHandler("onClientRender",getRootElement(), function() local px,py,pz = getElementPosition(getLocalPlayer()) local distance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if distance <= 150 then local sx,sy = getScreenFromWorldPosition ( x, y, z+0.95, 0.06 ) if not sx then return end local scale = 1/(0.3 * (distance / 150)) dxDrawText (name.."\n Nyitvatartás: "..open_hour..":"..open_minute.." - "..close_hour..":"..close_minute"", sx, sy - 30, sx, sy - 30, tocolor(255,255,255,255), math.min ( 0.4*(150/distance)*1.4,4), "bankgothic", "center", "bottom", false, false, false ) end end )
-
Nah mate not working. I think the problem is in client side, but i dont know where.
-
@#_iMr,[E]coo I tried, nothing in debug
-
@iPrestege is that okey, i can't hit with "fist" ?
-
Hi, i maded a script, when player have armor, object attaching to player.. Everything work, but i added NOT a same position for skins... Server Side: local object = {} addEvent("player:attach", true) addEventHandler("player:attach", root, function(source) local theobject = createObject(1242, 0,0,0) local skin = getElementModel(source) setObjectScale(theobject, 1.85) if (skin) == 310 then exports.bone_attach:attachElementToBone(theobject, source, 3, 0 , 0.035, 0.025, 0, 0, 0) object[source] = theobject elseif (skin) == 300 then exports.bone_attach:attachElementToBone(theobject, source, 3, 0 , 0.80, 0.025, 0, 0, 0) object[source] = theobject elseif (skin) == 250 then exports.bone_attach:attachElementToBone(theobject, source, 3, 0 , 0.80, 0.50, 0, 0, 0) object[source] = theobject end end ) addEvent("player:deattach", true) addEventHandler("player:deattach", root, function(e) exports.bone_attach:detachElementFromBone(object[e]) if isElement(object[e]) then destroyElement(object[e]) end end ) addEventHandler("onPlayerQuit", root, function() if object[e] and isElement(object[e]) then exports.bone_attach:detachElementFromBone(object[e]) if isElement(object[e]) then destroyElement(object[e]) end object[e] = nil end end ) Client Side: local armor = {} armor["created"] = false setTimer( function() local aLevel = getPedArmor(localPlayer) if aLevel > 0 then if not armor["created"] then triggerServerEvent("player:attach", root, localPlayer) armor["created"] = true end else if armor["created"] then triggerServerEvent("player:deattach", root, localPlayer) armor["created"] = false end end end, 500, 0 ) The problem is not changing the object position, when player changing the skin. But when i restart the resource, the position changig. Whats the problem?
-
Man.. You are a hero! Thankyou very much, And thanks the help again. In my country nobody help to anyone with script.. Thanks again!
-
still no working, i dont know whats wrong @iPrestege i tryed another version, (from facebook group) but still taking the weapon.
-
Not working dude. Still taking the weapon.
-
HeyGuys. I'm trying to make a script, which is very simple. Example: If player only have 1 ammo in his weapon , he can't shoot the last ammo .. gMe = getLocalPlayer() addEventHandler('onClientPlayerWeaponSwitch',gMe,function(prevSlot,currSlot) if(getPedTotalAmmo(prevSlot) == 1) then toggleControl('fire',true) end if(getPedTotalAmmo(currSlot) == 1) then toggleControl('fire',false) end Whats the problem?
-
fr_client in freeroam folder, then search ' function showWelcomeMap() createWindow(wndSpawnMap) showCursor(true) end Then deleet this. If im not right, let me know, and i'll find you. I don't remember exactly.
-
Yeh i know dude. Thanks for your help! btw i fixed like this: addEventHandler("onPlayerLogout", root, function(account) setElementHealth(source, 100) setAccountData(account, "admin.level", getElementData(source, "admin.level") or 0) removeElementData(source, "admin.level") kickPlayer(source, "Rendszer", "Kijelentkeztél.") end ) addEventHandler("onPlayerQuit", root, function ( ) local account = getPlayerAccount(source) if (account) and not (isGuestAccount(account)) then triggerEvent("onPlayerLogout", source, account) end end)
-
rlly working with logout, maybe thats why not savind the level when reconnecting, because no "onPlayerQuit"? Sorry for double post. I think i found the problem why not saving.. function dc ( account ) setElementHealth(source, 100) outputChatBox("You logged out", source) setAccountData(account, "admin.level", getElementData(source, "admin.level") or 0) removeElementData(source, "admin.level") end addEventHandler ( "onPlayerQuit", root, dc ) Whats the problem? Last problem edit: Fixed, thank you all guys your help! Finally working.
-
the lates edit: rlly working with logout, maybe thats why not savind the level when reconnecting, because no "onPlayerQuit"?
-
Not working dude.. http://imgur.com/a/6c2Cl
-
not workin dude, but thanks
-
I tested it right now, for me working everything.
-
Make sure you are in the right acl. <object name="user.YourUserName"></object>
-
anyone/??
-
still no working. no debug error.
-
Hi. I just started writing an admin system, but i already have a problem. Here is the admin level give system, which is working perfect. addCommandHandler("setalevel", function(player,cmd,...) if tonumber(getElementData(player, "admin.level")) >= 5 then local arguments = {...} if #arguments < 2 then outputChatBox(short.." /" .. cmd .. " [Name] [Level]",player, 255, 194, 14, true) else local targetPlayer = exports.serverExport:findPlayer(arguments[1], nil, 1, player) local currlevel = (tonumber(getElementData(targetPlayer, "admin.level"))) local szint = arguments[2] if targetPlayer then setElementData(targetPlayer, "admin.level",tonumber(szint)) outputChatBox(adminsz.." #6CB8FD"..getPlayerName(player).." #ffffffmegváltoztatta #6CB8FD"..getPlayerName(targetPlayer).." #ffffffadminisztrátori szintjét. #008531["..currlevel.." => "..szint.."]",root,255,255,255,true) outputChatBox(adminsz.." #ffffffSikeresen megváltoztattad #6CB8FD" .. getPlayerName(targetPlayer) .. " #ffffffadminszintjét. #008531["..currlevel.." => "..szint.."]",player,255,255,255,true) else outputChatBox("Player not found.",player) end end end end ) The problem is, when the player left the server, or just logging out, then loggin in, the player dont have he's admin level. What im using for saving: addEventHandler("onPlayerLogin", getRootElement(), function() outputChatBox(getPlayerName(source).."=> You successfully logged in.",source) setElementData(source, "admin.level") end ) addEventHandler("onPlayerLogout", root, function() setElementHealth(source, 100) outputChatBox("You logged out", source) setElementData(source, "admin.level") end ) I'm using the default MTA login, (/login /register etc etc...) whats the problem? Thanks any help.