SA-MP Forums Archive
Hello, I need help on blockin' command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Hello, I need help on blockin' command (/showthread.php?tid=197229)



Hello, I need help on blockin' command - blackwave - 08.12.2010

I have this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

     dcmd(setlevel,8,cmdtext);
    dcmd(drill,5,cmdtext);
    dcmd(kick,4,cmdtext);
    dcmd(car,3,cmdtext);
    dcmd(register,8,cmdtext);
    dcmd(login,5,cmdtext);
    dcmd(setcash,7,cmdtext);
    dcmd(an,1,cmdtext);
    dcmd(weather,7,cmdtext);
    dcmd(time,4,cmdtext);
    dcmd(admins,6,cmdtext);
    dcmd(cs,2,cmdtext);
    dcmd(jail,4,cmdtext);
    dcmd(unjail,6,cmdtext);
    dcmd(lgoto,5,cmdtext);
    dcmd(saldo,5,cmdtext);
    dcmd(sacar,5,cmdtext);
    dcmd(depositar,9,cmdtext);
    dcmd(goto,4,cmdtext);
    dcmd(stats,5,cmdtext);
    dcmd(rel,3,cmdtext);
        dcmd(pm,2,cmdtext);
        dcmd(blockpms,8,cmdtext);
        dcmd(unblockpms,10,cmdtext);
        dcmd(spy,3,cmdtext);
        dcmd(unspy,5,cmdtext);
        dcmd(speedon,7,cmdtext);
        dcmd(speedoff,8,cmdtext);
        dcmd(skin,4,cmdtext);
        // SOME OTHER COMMANDS BELOW
        return 0;
}
How can I make to player use all commands, strcmp or dcmd, or just dcmd after logging/registering?
My conditions of logging/registering:
pawn Код:
if(PlayerInfo[playerid][Registrado] == 0) return SendClientMessage(playerid, cinza, "Registre-se antes de usar comandos"); // Register
   if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, cinza, "Logue-se antes de usar comandos"); // Login
I'm lazy to do one per one lols


Re: Hello, I need help on blockin' command - Rachael - 08.12.2010

Please ask your question more clearly, I do not know what you are trying to do.


Re: Hello, I need help on blockin' command - blackwave - 08.12.2010

Quote:
Originally Posted by Rachael
Посмотреть сообщение
Please ask your question more clearly, I do not know what you are trying to do.
Sorry. I'm trying to block all commands. If player isn't logged/registered, commands would return a message. I told my conditions above (gPlayerLogged and PlayerInfo[playerid][Registrado]). I just want to block all commands for players not logged/registered


Re: Hello, I need help on blockin' command - blackwave - 08.12.2010

bump..

The message you have entered is too short. Please lengthen your message to at least 8 characters.


Re: Hello, I need help on blockin' command - DRIFT_HUNTER - 08.12.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

if(PlayerInfo[playerid][Registrado] == 0) return SendClientMessage(playerid, cinza, "Registre-se antes de usar comandos"); // Register
   if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, cinza, "Logue-se antes de usar comandos"); // Login

     dcmd(setlevel,8,cmdtext);
    dcmd(drill,5,cmdtext);
        // SOME OTHER COMMANDS BELOW
        return 0;
}