16.11.2010, 17:47
pawn Код:
if(strcmp(cmd, "/unjail",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /unjail [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "[Police] %s has been un-prisoned by Officer %s.", giveplayer, sendername);
ABroadCast(COLOR_BLUE,string,1);
SetPlayerPos(giveplayerid, 1551.0023,-1675.6843,15.6575);
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not a cop !");
}
}
return 1;
}