Vikola Posted July 19, 2009 Author Share Posted July 19, 2009 Ok so this is my second script and i made it for practice.i typed /test and it didnt work. can someoen help me?```Case "/test" If GetPlayerAccess(Index) = 5 Then Call PlayerMsg(Index, "Pass", WHITE) ElseIf GetPlayerAccess(Index) = 4 Then Call PlayerMsg(Index, "Pass", WHITE) Else Call PlayerMsg(Index, You aren't an admin!", RED) End If Exit Sub```=) Link to comment Share on other sites More sharing options...
DarkSpine Posted July 19, 2009 Share Posted July 19, 2009 @Vikola:> Ok so this is my second script and i made it for practice.> i typed /test and it didnt work. can someoen help me?> ```> Case "/test"> If GetPlayerAccess(Index) = 5 Then> Call PlayerMsg(Index, "Pass", WHITE)> ElseIf GetPlayerAccess(Index) = 4 Then> Call PlayerMsg(Index, "Pass", WHITE)> Else> Call PlayerMsg(Index, You aren't an admin!", RED)> End If> Exit Sub> ```=)Again, I don't see a problem with it, but try this:```Case "/test" If GetPlayerAccess(Index) = 5 Then Call PlayerMsg(Index, "Pass", WHITE) ElseIf GetPlayerAccess(Index) = 4 Then Call PlayerMsg(Index, "Pass", WHITE) End If If GetPlayerAccess(Index) < 4 Then Call PlayerMsg(Index, You aren't an admin!", RED) End If Exit Sub``` Link to comment Share on other sites More sharing options...
emblem Posted July 19, 2009 Share Posted July 19, 2009 Just a little heads up, you CAN do else's.And, you can use > to see if a number is bigger than another (or >= if a number is bigger or equal to another number)```Case "/test" If GetPlayerAccess(Index) >= 4 Then Call PlayerMsg(Index, "Pass", WHITE) Else Call PlayerMsg(Index, You aren't an admin!", RED) End If Exit Sub``` Link to comment Share on other sites More sharing options...
Vikola Posted July 19, 2009 Author Share Posted July 19, 2009 ok is it supposed to activate if i type /test?cuz it isnt working..my scripts are turned on Link to comment Share on other sites More sharing options...
emblem Posted July 19, 2009 Share Posted July 19, 2009 Well it should, and it looks fine from here. :/ 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