If GetPlayerAccess(index)>=1 ThenCall PlayerMsg(index, "Welcome Mods & Admins <News>", 4)ElseCall PlayerMsg (index, "welcome to" & GameName &"!", 15)End If
If LCase(Mid(TextSay, 1, 10)) = "/adminnews" Then If GetPlayerAccess => 4 If Len(TextSay) > 5 Then TextSay = Mid(TextSay, 5, Len(TextSay) - 4) Call PUtvar("adminnews.ini", "News", Current, Trim(Textsay)) Call PlayerMsg(index, "The Admin News has been changed to" & Trim(Textsay), 6) End If Else Call PlayerMsg(index, "You are not authorized to use that command!", 4) End If Exit Sub End If
If GetPlayerAccess(index)>=1 Then Call PlayerMsg(index, "Welcome! The Current News is:" & getvar("adminnews.ini", "News", Current), 4) Else Call PlayerMsg (index, "welcome to" & GameName &"!", 15) End If
When Japanese try to make RPGs, somebody sets up us the bomb
I edited it a bit:Add this command QuoteIf LCase(Mid(TextSay, 1, 10)) = "/adminnews" Then If GetPlayerAccess => 4 Then If Len(TextSay) > 11 Then TextSay = Mid(TextSay, 11, Len(TextSay) - 10) Call PutVar("adminnews.ini", "News", Current, Trim(Textsay)) Call PlayerMsg(index, "The Admin News has been changed to: " & Trim(Textsay), 6) End If Else Call PlayerMsg(index, "You are not authorized to use that command!", 4) End If Exit Sub End If And this is the new joingame codeQuoteIf GetPlayerAccess(index)>=1 Then Call PlayerMsg(index, "Welcome! The Current News is:" & Trim(GetVar("adminnews.ini", "News", Current)), 4)'Note: I added a trim to the above line to remove any errors, Its not required thoughElse Call PlayerMsg (index, "Welcome to " & GameName &"!", 15) 'ERROR: You didnt define GameNameEnd IfTell me if I made a mistake anywhere...
If LCase(Mid(TextSay, 1, 10)) = "/adminnews" Then If GetPlayerAccess => 4 Then If Len(TextSay) > 11 Then TextSay = Mid(TextSay, 11, Len(TextSay) - 10) Call PutVar("adminnews.ini", "News", Current, Trim(Textsay)) Call PlayerMsg(index, "The Admin News has been changed to: " & Trim(Textsay), 6) End If Else Call PlayerMsg(index, "You are not authorized to use that command!", 4) End If Exit Sub End If
If GetPlayerAccess(index)>=1 Then Call PlayerMsg(index, "Welcome! The Current News is:" & Trim(GetVar("adminnews.ini", "News", Current)), 4)'Note: I added a trim to the above line to remove any errors, Its not required thoughElse Call PlayerMsg (index, "Welcome to " & GameName &"!", 15) 'ERROR: You didnt define GameNameEnd If
If LCase(Mid(TextSay, 1, 10)) = "/adminnews" Then 'If LowerCase of 10 charactors of TextSay starting at charactor #1 is equal to /adminnewsIf Len(TextSay) > 11 Then 'If the length of textsay is Greater than 11 (To make sure they have more than the command)