-
Posts
575 -
Joined
Everything posted by codeluaeveryday
-
Fatal terror misunderstands... Im not doing a piss easy kill script, cause basemode already has kills and deaths, its just im logging each kill for total kills, and it will show all kills got by that account in scoreboard...
-
Oh god nothing at all no debug Is something wrong :S, um, btw my dxscoreboard is named Scoreboard ... Idk whats wrong
-
Debug shows nothing, um resource/s are defiantly running and What about return lol? Thanks for the info on resourceRoot. So What do u mean Check return value call function I have never needed to call before in scripts ive made
-
Capy i tried your thing... function addScoreboardItems() call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Total Kills",getRootElement(),1, 0.5) call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Total Deaths",getRootElement(),1, 0.5) end addEventHandler("onResourceStart",getRootElement(),addScoreboardItems) It still not creating columns
-
https://wiki.multitheftauto.com/wiki/Res ... coreboard?! Ok Capy, i guess tis page is wrong too...
-
Hey all, I wrote this within an hour... I realized that the scoreboard columns aren't creating... I haven't ever called a function before... Other than admin panel flags... function addTotalKill(totalAmmo, killer, killerWeapon, bodypart, stealth) local account = getPlayerAccount (killer) if (account) and (killer) then setAccountData(account,"totalkillsdeaths.kills",getAccountData(account,"totalkillsdeaths.kills")+1) setElementData(killer, "Total Kills", getAccountData(account,"totalkillsdeaths.kills")) end end addEventHandler ("onPlayerWasted", getRootElement(), addTotalKill) function addTotalDeath(totalAmmo, killer, killerWeapon, bodypart, stealth) local account = getPlayerAccount (source) if (account) then setAccountData(account,"totalkillsdeaths.Deaths",getAccountData(account,"totalkillsdeaths.Deaths")+1) setElementData(source, "Total Deaths", getAccountData(account,"totalkillsdeaths.Deaths")) end end addEventHandler ("onPlayerWasted", getRootElement(), addTotalKill) function checkAccountKillsDeaths(thePreviousAccount, theCurrentAccount, autoLogin) if (getAccountData(theCurrentAccount,"totalkillsdeaths.kills") == nil) and (getAccountData(theCurrentAccount,"totalkillsdeaths.deaths") == nil) then setAccountData(theCurrentAccount,"totalkillsdeaths.kills",0) setAccountData(theCurrentAccount,"totalkillsdeaths.deaths",0) end end addEventHandler("onPlayerLogin",getRootElement(),checkAccountKillsDeaths) function addScoreboardItems() call(getResourceFromName("scoreboard"), "scoreboardAddColumn", "Total Kills",getRootElement(),100,"Total Kills",3) call(getResourceFromName("scoreboard"), "scoreboardAddColumn", "Total Deaths",getRootElement(),100,"Total Kills",3) end addEventHandler("onResourceStart",getRootElement(),addScoreboardItems) Thanks in advance, Chris
-
onPlayerChat Teamchat w/h Color codes.
codeluaeveryday replied to codeluaeveryday's topic in Scripting
Thanks, I could have never thought of this. -
onPlayerChat Teamchat w/h Color codes.
codeluaeveryday replied to codeluaeveryday's topic in Scripting
Lol ok... Its basic, I can see it, but the ELEMENT is not working... No debug errors! Its all perfect i originally had outputChatBox(RGBToHex(getTeamColor(getPlayerTeam(source))).."(TEAM) "..tagcolor.."["..tag.."] #FFFFFF"..name..": "..textcolor..text, source, 255,255,255, true) That was for testing purposes! It all worked, but it was showing to all/theplayer... All else works but teamchat, it shows and no color ! So I tried to make it visible to the TEAM! SO LISTEN, EVERYTHING ELSE DOESNT MATTER FFS! ITS JUST THAT LINE! -
onPlayerChat Teamchat w/h Color codes.
codeluaeveryday replied to codeluaeveryday's topic in Scripting
function idtag(text, msgtype) local tag = getElementData(source, "ID") local tagcolor = get('tagidcolor') local textcolor = get('textcolor') local name = getPlayerName(source) if (msgtype == 0) then cancelEvent() if tag then cancelEvent() outputChatBox(tagcolor.."["..tag.."] #FFFFFF"..name..": "..textcolor..text, getRootElement(), 255, 255, 255, true) outputServerLog(name .. ": " .. text) end elseif (msgtype == 2) then cancelEvent() outputChatBox(RGBToHex(getTeamColor(getPlayerTeam(source))).."(TEAM) "..tagcolor.."["..tag.."] #FFFFFF"..name..": "..textcolor..text, getTeamName(getPlayerTeam(source)), 255,255,255, true) outputServerLog("TEAM: "..name .. ": " .. text) end end addEventHandler("onPlayerChat", root, idtag) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end Omg kenix, ALL I NEED is outputChatBox(RGBToHex(getTeamColor(getPlayerTeam(source))).."(TEAM) "..tagcolor.."["..tag.."] #FFFFFF"..name..": "..textcolor..text, getTeamName(getPlayerTeam(source)), 255,255,255, true) to be visible by the current player TEAM!!!!!!! Im just recreating teamchat, by u making me show my progress i risk someone stealing it before i release the update. They will claim it as theirs... -
onPlayerChat Teamchat w/h Color codes.
codeluaeveryday replied to codeluaeveryday's topic in Scripting
Didnt work :SSS -
Hey, i just need help with one line LOL! Please ignore everything else! All i need you to pay attention to is the element. I believe it will show to the team. When i do so it shows no color, and # colors are shown. Any ideas? outputChatBox(RGBToHex(getTeamColor(getPlayerTeam(source))).."(TEAM) "..tagcolor.."["..tag.."] #FFFFFF"..name..": "..textcolor..text, getTeamName(getPlayerTeam(source)), 255,255,255, true) Thanks in advance, Chris *EDIT* It was working with old one... Instead it was showing to all, so i added the team as an element. RBGToHex is all good. Just the element.
-
Omg dirt level is never possible!!!!!!!! Its all done in one of the files in GTASA. I doubt MTA can ever do it. It could be impossible. Although everytime someone says impossible MTA always proves us wrong?!?!?!?
-
Ok, i tried his approach, it didnt work The resource appears to disappear from the server until i do /refresh...
-
Lol, Im always reading the fucking wiki!, infact i have it minimized. I read every part carefully. I recommend you don't say obvious things noob...
-
*EDITED* Sorry.
-
Ozzin, stop acting like a pro, i just saw your new noob post. So shut it idiot, i know about XML's... Im using 1.2 faggot. JESUS, can someone ban this guy for being an idiot. Or at least a master troll. Could i please have an actual scripter help. I'd bet i made better scripts then this noob.
-
Well this makes no sense... Your making the variable eat itself basically... What you have done is basically this: var = dxDrawText(dxDrawText(dxDrawText(dxDrawText))) and so on, its basically infinite. Please share your full code and we will help...
-
Hello, I've tried a few new functions from MTA 1.2. Now looking at this one i think it is bugged. My script is simple, you can do /delres scores, it says in chatbox it works, and then the resource is not readable from the server until i do /refresh. So it doesnt delete it, it seems to be only hiding it until refreshed or restarted. Any ideas?
-
Guys get this... Your both wrong, yes it can be decoded, but only common strings can be converted. Like gaylord, 123. I attempted this yesterday. But when trying my long password, it couldnt be decoded. Only the common md5's can be converted!
-
lol nvm, Castillo to the rescue.
-
Client: function checkPing() local ping = getPlayerPing(source) if (ping > 350) then outputChatBox("#FF0000Your ping is high, lower it please.", source,255,255,255,true) end end addEventHandler("onClientPlayerJoin", getRootElement(), checkPing) function triggerPingKicker() if getPlayerPing(getPlayerName(getLocalPlayer())) >= maxPing then triggerServerEvent("ping.onKickHighPing",getLocalPlayer(),getPlayerPing(getLocalPlayer())) end end setTimer(triggerPingKicker,5000,0) Server: local maxPing = 350 function onHighPing() kickPlayer ( thePlayer, "Your ping is over the limit. (over "..maxPing..")" ) outputChatBox("#FF0000"..getPlayerName(source).."#FF0000 has been kicked for high ping.",root,255,0,0,true) end addEvent( "ping.onKickHighPing", true ) addEventHandler( "ping.onKickHighPing", getRootElement(), onHighPing ) Try this one. i attempted to use getPlayerName(getLocalPlayer()). Let me know of more errors if any persist.
-
Hey, go into your race XML and look for these lines: "*randommaps" value="false" friendlyname="Random maps" accept="false,true" group="Gameplay" desc="Set to true to make the next map selection automatic." /> Where it says value="false", change this to value="true". This should have solved your problem.
-
Your welcome, sorry for being very stubborn. Best wishes to you. Does the script work? If not what are the debug errors shown in /debugscript 3?
-
Lol i changed many things. In your client you used onPlayerJoin as the event handler?!?!?!!? UM ?!?!? Its onClientPlayerJoin... and outputChatBox("#FF0000Your ping is high, lower it please.", source) didnt support colors, now it does.... and ofc your settimer was WRONG! and kickPlayer in the server was used incorrectly?!?!?!?!?! I basically simplified it! Could you please read my code carefully next time! I really hate justifying myself.
-
Sorry, we cannot just give you the code . I have a funny feeling some people like al3brab will give you the code and then solidsnake will yell at them for giving the code