Help with admin levels!
#4

Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by [CK
Steel ]
Copy and paste that into your script, and try now

pawn Код:
if(strcmp("/givemetcash", cmdtext, true) == 0)
    {
        if(PlayerInfo[playerid][aLevel] = 1) return SendClientMessage(playerid, red, "You are not an admin");

        GivePlayerTcash(playerid, 1000000);

        SendClientMessage(playerid, green, "You got 1 million Tcash!");
        return 1;
    }
FAIL +1


pawn Код:
if(strcmp("/givemetcash", cmdtext, true) == 0)
    {
        if(PlayerInfo[playerid][aLevel] == 0/*Note the ==*/) return SendClientMessage(playerid, red, "You are not an admin");
        GivePlayerTcash(playerid, 1000000);
        SendClientMessage(playerid, green, "You got 1 million Tcash!");
        return 1;
    }
Dude are you a complete RETARD? Omg, and stop trying to cause flames... He supposed to put 1 cause that is the admin LEVEL. And first of all you do not know how to read damn posts cause he said he wanted it so that it lets ONLY admins type/Do that command. So if he wants admins to do that command then he needs to place a 1 in,
Код:
[aLevel] == 1
. First of all 1 signifies the admin level. 1, 2, 3, 4, 5 or what ever the Admin level is it in his script. If he puts 0 then it will let everyone use it, those who are not admins. Get me now? Duh.

So use this one...

pawn Код:
if(strcmp("/givemetcash", cmdtext, true) == 0)
    {
        if(PlayerInfo[playerid][aLevel] == 1) return SendClientMessage(playerid, red, "You are not an admin"); // [aLevel] == 1 signifies that level admins +1 will be able to use that command.
         GivePlayerTcash(playerid, 1000000);
         SendClientMessage(playerid, green, "You got 1 million Tcash!");
        return 1;
    }
Reply


Messages In This Thread
Help with admin levels! - by coole210 - 07.06.2009, 00:39
Re: Help with admin levels! - by [CK]Steel - 07.06.2009, 03:01
Re: Help with admin levels! - by [HiC]TheKiller - 07.06.2009, 04:45
Re: Help with admin levels! - by [CK]Steel - 07.06.2009, 11:34
Re: Help with admin levels! - by [HiC]TheKiller - 08.06.2009, 00:38

Forum Jump:


Users browsing this thread: 1 Guest(s)