Kirby Lord Posted May 1, 2009 Author Share Posted May 1, 2009 ```Case = "/changecolor"If GetPlayerAccess(Index) < 4 Thencall colorplayername(index, 15)Elsecall playermsg(Index, "An Error Occured.", BRIGHTRED)End ifExit Sub```What's wrong with this script? Link to comment Share on other sites More sharing options...
Bobosk Posted May 2, 2009 Share Posted May 2, 2009 you don't need the "Case = "/changecolor", it's just "Case /changecolor" Link to comment Share on other sites More sharing options...
Kirby Lord Posted May 2, 2009 Author Share Posted May 2, 2009 Ok I changed that, but now it just says "an error occurred". What else is wrong?```Case "/changecolor"If GetPlayerAccess(Index) < 4 Thencall colorplayername(index, 15)Elsecall playermsg(Index, "An Error Occured.", BRIGHTRED)End ifExit Sub``` Link to comment Share on other sites More sharing options...
Bobosk Posted May 2, 2009 Share Posted May 2, 2009 well, it'll only work if you have an access lower than 4… which i doubt is the case of yourself, since you're editing the scripts.. Link to comment Share on other sites More sharing options...
achap89 Posted May 3, 2009 Share Posted May 3, 2009 Ok first off you are using the wrong variable all together second off like bobosk said you are using less than where you should be using greater than. And last, you need parenthises around the 15\. here is your code that I fixed for you.```Case "/changecolor"If GetPlayerAccess(Index) > 4 Thencall SetPlayerNameColor(index, "15")Elsecall playermsg(Index, "An Error Occured.", BRIGHTRED)End IfExit Sub```This command will let you pick when you type in the code for example /changecolor 15 (15 is the color that I want the name to be)```Case "/changecolor"If GetPlayerAccess(Index) > 4 ThenColorID = TextSay(1)Call SetPlayerNameColor(Index, ColorID)ElseCall PlayerMsg(Index, "An Error Occured.", BRIGHTRED)End IfExit Sub```On the code below you can change other players colors (Example: /changecolor Kira 15 Kira is the player and 15 is the color)```Case "/changecolor"If GetPlayerAccess(Index) > 4 ThenPlayerID = FindPlayer(TextSay(1))ColorID = TextSay(2)Call SetPlayerNameColor(PlayerID, ColorIDElseCall PlayerMsg(Index, "An Error Occured.", BRIGHTRED)End IfExit Sub```GoodLuck! :) Link to comment Share on other sites More sharing options...
Bobosk Posted May 3, 2009 Share Posted May 3, 2009 Case "/changecolor"If GetPlayerAccess(Index) > 4 Thencall SetPlayerNameColor(index, "15")Elsecall playermsg(Index, "An Error Occured.", BRIGHTRED)End IfExit SubYou don't need quotes around the 15, and i didn't tell him to use a > instead of a <, i'm saying that his access is higher than what his script is checking for, all in all, not every / command needs a check for access, which is obviously a common mis-conception, judging by your recent "tutorials" Link to comment Share on other sites More sharing options...
achap89 Posted May 3, 2009 Share Posted May 3, 2009 Bobosk Im sorry im not as good as "scripter" as you are _obviously_ are but it works in my game and I only said you said that he is using less than I wanted him to know that he should be using the greater than for him to be able to use it Link to comment Share on other sites More sharing options...
Kirby Lord Posted May 3, 2009 Author Share Posted May 3, 2009 Wow it works thanks! Well I'll be off to try and learn some more scripting Lol. Link to comment Share on other sites More sharing options...
achap89 Posted May 3, 2009 Share Posted May 3, 2009 No problem. :) Good Luck on your game! Link to comment Share on other sites More sharing options...
Kirby Lord Posted May 3, 2009 Author Share Posted May 3, 2009 Wait, other players can't see my color change? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now