Quote:
Originally Posted by BiG_Sm0k3
what this doesnt work?
pawn Код:
if (!strcmp("/checkadmin", cmdtext)) { if(IsPlayerAdmin(playerid)) == 1) { SendClientMessage (playerid, COLOR_YELLOW, "-You are a Admin!!-"); } else SendClientMessage(playerid, COLOR_YELLOW, "You are Nothing!!"); return 1;}
anyway it should look like this
pawn Код:
if (!strcmp("/checkadmin", cmdtext)) { if(IsPlayerAdmin(playerid)) == 1) { SendClientMessage (playerid, COLOR_YELLOW, "-You are a Admin!!-"); } if(IsPlayerAdmin(playerid)) == 0) {SendClientMessage(playerid, COLOR_YELLOW, "You are Nothing!!"); } return 1;}
|
Actually his example would work fine.. If you wanted to make it shorter you can do:
pawn Код:
if (!strcmp("/checkadmin", cmdtext))
{
if(IsPlayerAdmin(playerid)) == 1)
SendClientMessage (playerid, COLOR_YELLOW, "-You are a Admin!!-");
else
SendClientMessage(playerid, COLOR_YELLOW, "You are Nothing!!");
return 1;
}
But to change colors, Replace COLOR_YELLOW with a Hex+Alpha code. For Example, #FF0000FF is red.