login and register

Started by Cool, Nov 05, 2015, 02:46 PM

Previous topic - Next topic

Cool

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

DizzasTeR

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.

KAKAN

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
}
oh no

Cool

#3
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

MacTavish

Use @Doom_Kill3R's code that is an easiest way to go through every command

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Cool

i try but its says you are not registered or login while i am login and registered

Cool