OnPlayerCommandPerformed Bug
#1

I'm trying to make for who didn't login can't use any commands but it not working.. please help me.. when i use /rules commands it still pop up this is the script
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
    {
        SendClientMessage(playerid,-1,""red"[SERVER]: "white"Unknown Command!");
        PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
    }
    if(!IsPlayerLogged(playerid)) return SendClientMessage(playerid,-1,""red"[SERVER]: "white"You must login to use any commands!");
    return 1;
}
IsPlayerLogged code
pawn Код:
stock IsPlayerLogged(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new file[256], tmp2;

format(file,256,"/ultrax/Users/%s.ini",name);
tmp2 = dini_Int(file,"Logged");

if((IsPlayerConnected(playerid)) && (tmp2 == 1) )
return true;
else return false;
}
Reply


Messages In This Thread
OnPlayerCommandPerformed Bug - by dh240473 - 22.10.2016, 04:37
Re: OnPlayerCommandPerformed Bug - by DTV - 22.10.2016, 04:42
Re: OnPlayerCommandPerformed Bug - by dh240473 - 22.10.2016, 04:46
Re: OnPlayerCommandPerformed Bug - by DTV - 22.10.2016, 04:47
Re: OnPlayerCommandPerformed Bug - by dh240473 - 22.10.2016, 04:50
Re: OnPlayerCommandPerformed Bug - by DTV - 22.10.2016, 04:52
Re: OnPlayerCommandPerformed Bug - by dh240473 - 22.10.2016, 05:01
Re: OnPlayerCommandPerformed Bug - by DTV - 22.10.2016, 05:04
Re: OnPlayerCommandPerformed Bug - by Sew_Sumi - 22.10.2016, 10:32

Forum Jump:


Users browsing this thread: 2 Guest(s)