04.10.2013, 18:25
Hello! This is my Command to set the Drunk Level.
It is not setting the Drunk Level, Can any one tell me why?
It is not setting the Drunk Level, Can any one tell me why?
pawn Код:
CMD:drunk(playerid, params[])
{
if(pInfo[playerid][pAdminLevel]> 1 ) return 0;
if( GetPlayerVirtualWorld( playerid ) != 0 ) return SendClientMessage( playerid, COLOR_RED, "[ ! ] You can't use Admin Commands in Virtual World !" );
new giveplayerid;
new DrunkLevel;
if(sscanf(params,"u",playerid)) return SendClientMessage(playerid, COLOR_RED1, "[ ! ] USAGE: /drunk <playerid> <drunklevel>");
SetPlayerDrunkLevel(giveplayerid, DrunkLevel);
if( DrunkLevel < 2000 || DrunkLevel > 50000 ) return SendClientMessage( playerid, COLOR_RED, "[ ! ] Invalid Drunk Level (2000-50000)." );
SendClientMessage(giveplayerid, COLOR_RED1, "[ ! ] Your Drunk Level has been set to %d by an Admin");
return 1;
}