18.07.2011, 15:42
pawn Код:
if(strcmp("/makecaptain", cmdtext, true) == 0)
{
new targetid;
if(IsPlayerConnected(targetid))
{
if(IsPlayerAdmin(playerid))
{
new pSkin;
pSkin = GetPlayerSkin(playerid);
if(pSkin == 255))
{
new string[128]; // Make sure your strings are ALWAYS no higher than 128 cells
new sendername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, string, sendername2);
format(string, sizeof(string),"%s has made you a Captain, Don't abuse this position!", sendername2);
SetPlayerTeam(targetid, 0);
}
}
else
{
SendClientMessage(playerid, COLOR_WRONG, "You are not an admin!");
}
}
else
{
SendClientMessage(playerid, COLOR_WRONG, "Player Not Connected!");
}
return 1;
}