10.08.2012, 17:11
Quote:
Thanks but i don't want in RCON , just from admin level 1 to 1338 and without using zcmd ...
|
Here is the command in strcmp, placed it under OnPlayerCommandText:
pawn Код:
if (strcmp("/duty", cmdtext, true, 5) == 0)
{
// if the player isnt logged into rcon , it will send the below message (change it to your desire)
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Invalid Command. Type /commands For A List Of Commands.");
if(OnDuty[playerid] == 0)
{
GameTextForPlayer(playerid,"~g~ on duty");
SetPlayerSkin(playerid,skinid); // set your desired skin here
SetPlayerHealth(playerid,100000);
GivePlayerWeapon(playerid,38,133337);
OnDuty[playerid] = 1;
}
else
{
GameTextForPlayer(playerid,"~r~ off duty");
SetPlayerSkin(playerid,skinid); // set your desired skin here
SetPlayerHealth(playerid,100);
ResetPlayerWeapons(playerid);
OnDuty[playerid] = 0;
}
return 1;
}