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,
. 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;
}