03.08.2011, 08:54
i got another code but one line problem:
line 338:
Quote:
pwn ( 388 ) : warning 217: loose indentation |
pawn Код:
SendClientMessage(giveplayerid,0xAFAFAFAA, string);
pawn Код:
CMD:setadmin(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 9)
{
new sendername[MAX_PLAYER_NAME];
new giveplayername[MAX_PLAYER_NAME];
new giveplayerid,level;
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
if (!sscanf(params, "ui", giveplayerid,level)) //u = username.
{
if (giveplayerid != INVALID_PLAYER_ID)
{
new string[128];
format(string, sizeof(string), "The admin %s has made you a level %d admin",sendername,level);
SendClientMessage(giveplayerid,0xAFAFAFAA, string);
format(string, sizeof(string), "You have made %s a level %d admin",giveplayername,level);
SendClientMessage(playerid, 0xAFAFAFAA, string);
PlayerInfo[giveplayerid][pAdmin] = level;
}
}
else SendClientMessage(playerid, 0xAFAFAFAA, "SYNTAX:/setadmin [playerid] [level]");
}
else SendClientMessage(playerid, 0xAFAFAFAA, "You are not a Community Staff Member! Or Your Level is too low!");
}
return 1;
}