Jump to content

yoya99

Members
  • Posts

    271
  • Joined

  • Last visited

Everything posted by yoya99

  1. yoya99

    dxdraw problem

    so what i have to add that it only shows the image admins?
  2. yoya99

    dxdraw problem

    like that or ?? local sx,sy = guiGetScreenSize() function showImage() if isObjectInACLGroup("user."..getAccountName(source), aclGetGroup("Admin"))(localPlayer, "showimg") then dxDrawImage((sx-800)/2, (sy-600)/2, 800, 600, "player.png" ) end end addEventHandler("onClientRender", root, showImage) And second how can i make it shown at the right sy sx for different resolutions??
  3. yoya99

    XP little help

    like that? local sx, sy = guiGetScreenSize ( ) local y = sy + 20 function onLevelup() dxDrawRectangle(sx*(707/1024), sy*(425/768), sx*(115/1024), sy*(27/768), tocolor(44, 44, 44, 221), true) dxDrawText("Rank up+", sx*(716/1024), sy*(429/768), sx*(808/1024), sy*(448/768), tocolor(0, 255, 0, 221), 0.70, "bankgothic", "left", "top", false, false, true, false, false) end function onwin( ) if ( y > ( sy / 2 ) ) then y = y - 2 elseif ( y < ( sy / 2 ) ) then y = ( sy / 2 ) end dxDrawText ( "+"..tostring(experience).." XP", 550, y, sx, 40, tocolor(255, 255, 255, 255), 0.8, "bankgothic") end addEvent("onwin", true) addEventHandler( "onwin", root, function(expe) if not isTimer(expTimer) then expTimer = setTimer(function() removeEventHandler("onClientRender", root, onTestExp) end, 2000, 1) experience = expe addEventHandler("onClientRender", root, win) else experience = (experience + expe) resetTimer(expTimer) end end)
  4. yoya99

    dxdraw problem

    another problem...i am not admin but it draws the image for Admin help pls
  5. yoya99

    dxdraw problem

    Ok i will try out right now
  6. yoya99

    dxdraw problem

    i use that both codes here: server side: function setDataOnLogin() if not isGuestAccount(getPlayerAccount(source)) and isObjectInACLGroup("user."..getAccountName(source), aclGetGroup("Everyone")) then setElementData(source, "showimg", true) end end addEventHandler("onPlayerLogin", root, setDataOnLogin) function setDataOnResourceStart() for i, v in ipairs(getElementsByType("player")) do if not isGuestAccount(getPlayerAccount(v)) and isObjectInACLGroup("user."..getAccountName(v), aclGetGroup("Everyone")) then setElementData(v, "showimg", true) end end end client side: nameWidth = 1 teamWidth = 1 sx = 1 scale = 1 imageSize = 2 function showImage() dxDrawImage( sx + math.max(nameWidth/2, teamWidth/2) + 0*scale, sy - imageSize, imageSize, imageSize, "classicon_player.png" ) end addEventHandler("onClientResourceStart", resourceRoot, function() addEventHandler("onClientRender", root, showImage) end)
  7. yoya99

    dxdraw problem

    ok i fixed the errors now but i dont see any image...i tried to logout so i am in acl group everyone and then i dont see my image ((( helpppp
  8. yoya99

    dxdraw problem

    the same error message with 'sx' now...do i add it too?
  9. yoya99

    dxdraw problem

    I try it out now one moment;)
  10. yoya99

    dxdraw problem

    thats all?? where to add that?
  11. yoya99

    dxdraw problem

    how can i define it? To draw it i have added it in the nametags.lua too..how to solve this problem?
  12. hello there i have this codto draw an image near the head of a player wich is ina dmin acl but i get an error.... The Error is:Error:class/client.lua:2 : attempt to perform arithmetic on global "nameWidth" (a nil value) Can someone help me pls?? here is the client.lua: function showImage() dxDrawImage( sx + math.max(nameWidth/2, teamWidth/2) + 0*scale, sy - imageSize, imageSize, imageSize, "player.png" ) end addEventHandler("onClientResourceStart", resourceRoot, function() addEventHandler("onClientRender", root, showImage) end)
  13. hello there i have this codto draw an image near the head of a player wich is ina dmin acl but i get an error.... The Error is:Error:class/client.lua:2 : attempt to perform arithmetic on global "nameWidth" (a nil value) Can someone help me pls?? here is the client.lua: function showImage() dxDrawImage( sx + math.max(nameWidth/2, teamWidth/2) + 0*scale, sy - imageSize, imageSize, imageSize, "player.png" ) -- Here will go the rest of your code. end addEventHandler("onClientResourceStart", resourceRoot, function() addEventHandler("onClientRender", root, showImage) end)
  14. yoya99

    help dx

    Hey i want if a player is login that a image is shown at the left of the head ....if ze plays as a guest it should be another different image .... Thx
  15. yoya99

    tag

    Hey my question i want to make the (Team) : say tag into (Group): say tag but what do i have to do in which folder direction i have to look??? I use freeroam and play.....thx
  16. yoya99

    XP little help

    you dont understand what i mean.....if i kill soemone and get xp i want it to show a dxdraw text .... like + 1 xp on the side....
  17. i have this xp system from castillo and i want to add a text 1. when a player levels up and 2. when a player gets xp . It should be e.g : +2 XP on the left side or like + Level up on the right side here is the code:(a part) function win(ammo, killer, weapon, bodypart) if (killer and getElementType(killer) == "player" and killer ~= source) then local H = getElementData(killer, "XP") or 5 local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) local X = 1 setElementData(killer, "XP", tonumber(H)+X) local H = tonumber(H) + X if tonumber(H) == 2 then setElementData(killer, "Level", "Level 1 Reach:10 XP") elseif tonumber(H) == 5 then setElementData(killer, "Level", "Level 2 Reach:15 XP") elseif tonumber(H) == 10 then setElementData(killer, "Level", "Level 3 Reach:25 XP") and here is the code where the dxdrawtext should be added then (i guess) : function getXP ( _, playerName ) if ( playerName ) then local thePlayer = getPlayerFromParticalName ( playerName ) if ( thePlayer ) then local Level = getElementData(thePlayer,"Level") or 0 local XP = getElementData(thePlayer,"XP") or 0 outputChatBox ( getPlayerName ( thePlayer ) .." XP ".. tostring ( XP ) .." LV: ".. tostring ( Level ) .." " ,155,211,216) else outputChatBox ( "Couldn't find '" .. playerName .. "'", source ) end end end addCommandHandler ( "getxp", getXP ) addCommandHandler ( "getXP", getXP ) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end thx in advance
  18. Ye just all of your resources are in section stoleb resoure accosations..like the target_pilot
  19. Yeah report your clo(w)n server(cloned) yourself
  20. i did not steal it...how could i post it here?? Zares you compilingyour resources lollike everyone other too so how should i steal it?? Second: With the walking style and the Fighting style were my codes because nobody answered my topics you made a new topic and let users make it for you...If i would write to the community to bnlock your ip of server then you are done or?
  21. I dont call that constructive help now.... If nobody can give me an normal answer then go pls away
  22. so...for each kill you get 2xp....you see it in the first code....and then you are level 1 with 2 xp or lvl 2 with 5 xp and so on....thats how t works...but i dont get XP and t doesnt shows me the xp how much i got (+...tosnumber XP) and so on...
  23. you dotn gonna help me or? no i didnt see this code on that topic....its from ma friend
×
×
  • Create New...