Jump to content

toxicsmoke11

Members
  • Posts

    232
  • Joined

  • Last visited

Everything posted by toxicsmoke11

  1. everything is same except that end which u told me to replace, and when i replaced end with your thing, i added extra outputchatbox there too but it also didnt output
  2. my element data is successfully changing, and there is no problem in it, i don't need 'else'. only problem is that it doesn't output the message when player can't use repair,however after 15 secs expire, it outputs that he can use repair again
  3. your argument in function line won't ban him, 'outPutChatBox' does not exist, your message won't be in color and instead it will show text #030F00 within your text, and your function won't ever be called so it's useless, Mr.ShariQ shall stay not banned.
  4. i have added 'command' without ' ' on last argument and it didnt do anything
  5. yea in here blockTimer = setTimer(blockRepairCmdFunc,250,0) if blockTimer then
  6. oh thanks but when im not allowed to use that command, it doesn't output that i need to wait 15 nor it gives debugscript 3 error or warning
  7. you didn't read my whole script. i am calling that function when needed,not using event handler @Et-win im sure its repair and g_Me stands for getLocalPlayer() and when i output it,it outputs userdata value and in debugscript 3 it says expected number at argument 2,got player
  8. i have tried your timer solution and it gave me error that it expected a function in 3rd argument but got nil what the fuck? function exists already and script says that it doesnt exist when i unmute myself
  9. i dont really see point of making function unnamed,it will do same work only change what you did is added source twice, and it doesn't work for me.
  10. no errors and text doesnt get removed edit: more info: im having element data 1, and it should be 0 when server event was triggered but i don't see any problem function serverFunction() setElementData(source,"apple",0) triggerClientEvent("secondFunction",source) end addEventHandler("onPlayerUnmute",root,serverFunction)
  11. what's your problem Exactly Please Explain Better . it can clearly be seen in the script code that im trying to remove the text when custom event gets triggered,and it gets triggered in server side script
  12. function test() -- dxdraw and shit bla bla -- couple of ends without handler function firstFunction() setElementData(localPlayer,"apple",1) addEventHandler("onClientRender",root,test) end addEvent("firstFunctionn",true) addEventHandler("firstFunctionn",root,firstFunction) function secondFunction() setElementData(localPlayer,"apple",0) thirdFunction() end addEvent("secondFunction",true) addEventHandler("secondFunction",root,secondFunction) function thirdFunction() removeEventHandler("onClientRender",getRootElement(),test) end the events are getting triggered by server side script
  13. how do i fix this annoying error?its really pain in the ass it occurs when removing event handlers and trying to add them again like with dxDrawText onClientRender how to fix this?
  14. still doesnt work i changed it to snick
  15. sry for double post but im having one problem with this i made command for this and seems like i am only one able to use this command and idk why function setCustomNick(player,cmd,data) if data then setElementData(player,"setnick",data) outputChatBox("Nick has been set to: "..data,player,255,255,255,true) outputChatBox(getElementData(player,"setnick")) -- debug purpose which only was outputted when i used the command,for others it didnt output at all on chat else outputChatBox("Correct Syntax is /setnick [Nickname]",player) end end addCommandHandler("setnick",setCustomNick) also i have made it so when you set the data that it saves into account if you have an account before you leave,and that it loads it when you login it saves the data perfectly fine for me and it loads it fine too but for other players this thing doesn't work anyone knows why?
  16. i have used your 3 variables just renamed them to rr gg bb because i got r g b for random player nametag color and its still black
  17. okay thanks,just one more question: why is my team drawn in black color instead of my "natural" team color? my team color is not even close to black
  18. i dont understand how could this fix the problem with team name error?
  19. hi i got nametag example from wiki and trying to edit it but i got some error attempt to call local player TeamName a string value addEventHandler( "onClientRender",root, function( ) local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for _, v in ipairs( getElementsByType 'player' ) do tx, ty, tz = getElementPosition( v ) dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 30.0 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then local sx, sy, sz = getPedBonePosition( v, 5 ) local x,y = getScreenFromWorldPosition( sx, sy, sz + 0.3 ) local x1,y1 = getScreenFromWorldPosition( sx, sy, sz + 0.35 ) local playerTeam = getPlayerTeam(localPlayer) local playerTeamName = getTeamName(playerTeam) local playerTeamColor = getTeamColor(playerTeam) local r,g,b = math.random(50,255),math.random(50,255),math.random(50,255) if x then if playerTeam then dxDrawText( getPlayerName( v ), x, y, x, y, tocolor(playerTeamColor), 0.85 + ( 15 - dist ) * 0.02, "default-bold" ) dxDrawText( playerTeamName( v ), x1, y1, x1, y1, tocolor(playerTeamColor), 0.85 + ( 15 - dist ) * 0.02, "default-bold" ) else dxDrawText( getPlayerName( v ), x, y, x, y, tocolor(r,g,b), 0.85 + ( 15 - dist ) * 0.02, "default-bold" ) dxDrawText( "Normal Player", x1, y1, x1, y1, tocolor(r,g,b), 0.85 + ( 15 - dist ) * 0.02, "default-bold" ) end end end end end end ) i dont understand the problem
  20. hmm he has 11 object..probably 11 dollars. it is surely very hard to make 11 objects today,it takes days..weeks...
×
×
  • Create New...