Hi guys can you help me
i need help in my server players can use cmds if he not registered and he can use cmds if he not login is there any function to solve it
Note: using fuzzie account system
function onPlayerCommand( player, cmd, text )
{
if( cmd.tolower() != "login" || cmd.tolower() != "register" && !pstats[ player.ID ].Logged ) return MessagePlayer( "Error: You must be logged in or registered to use any commands!", player );
}
keep that line on the inside-top of your event.
Yea, use this
function onPlayerCommand( player, cmd, text ){
//Your login and register things
if( stats[ player.ID ].Logged ) RegUserCmds( player, cmd.tolower(), text.tolower() )
else PrivMessage( player, "You need to be logged-in and registered to use this command" );
}
Now use this for registered and logged-in players
function RegUserCmds( player, cmd, text ){
//Your cmds here
}
Thanks kakan and dhoom
[mergedate]1446736853[/mergedate]
[EDIT] hi
@KAKAN i added your function its works but i want to add function onadmincmds its not works
Use
@Doom_Kill3R's code that is an easiest way to go through every command
i try but its says you are not registered or login while i am login and registered