onplayercommandtext not working
#2

Quote:
Originally Posted by KillerStrike23
Посмотреть сообщение
hello guys, so this time i want to prevent the players from using any cmds if they weren't logged in but the player can use cmds and the clientmessage doesn't appear why ?
pawn Код:
//===========================Anti Login CMD Use=================================
public OnPlayerCommandText(playerid, cmdtext[])
{
    if( (udb_Exists(PlayerName2(playerid))) && (PlayerInfo[playerid][LoggedIn] == 0) )
    {
        SendClientMessage(playerid, red, "This account is registered you need to be logged in to use any cmd");
        return 0;
    }
    return 1;
}
I'm pretty sure that the return 1; should be before the return 0;

Tell me if it fixes the problem or not

Код:
//===========================Anti Login CMD Use=================================
public OnPlayerCommandText(playerid, cmdtext[])
{
    if( (udb_Exists(PlayerName2(playerid))) && (PlayerInfo[playerid][LoggedIn] == 0) )
	{
		SendClientMessage(playerid, red, "This account is registered you need to be logged in to use any cmd");
		return 1; 
	}
    return 0;
}
Reply


Messages In This Thread
onplayercommandtext not working - by KillerStrike23 - 21.01.2016, 23:18
Re: onplayercommandtext not working - by brandypol - 21.01.2016, 23:35
Re: onplayercommandtext not working - by Vince - 21.01.2016, 23:36
Re: onplayercommandtext not working - by KillerStrike23 - 22.01.2016, 00:10
Re: onplayercommandtext not working - by KillerStrike23 - 22.01.2016, 00:37
Re: onplayercommandtext not working - by SickAttack - 22.01.2016, 01:19
Re: onplayercommandtext not working - by KillerStrike23 - 22.01.2016, 01:34
Re: onplayercommandtext not working - by SickAttack - 22.01.2016, 02:49

Forum Jump:


Users browsing this thread: 3 Guest(s)