21.07.2011, 12:19
pawn Код:
CMD:uninvite(playerid, params[])
{
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new string[128];
if(IsPlayerConnected(playerid))
{
new idx;
temp = strtok(params, idx);
if(!strlen(temp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /uninvite {959561}[ID/PartOfName] {838361}");
return 1;
}
new para1;
para1 = ReturnUser(temp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] > 0)
{
if(PlayerInfo[playerid][pLeader] == PlayerInfo[para1][pMember])
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You have been kicked out from org. from leader: %s.", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
SendClientMessage(para1, COLOR_LIGHTBLUE, "* You are civilian.");
gTeam[para1] = 3;
PlayerInfo[para1][pTeam] = 3;
PlayerInfo[para1][pMember] = 0;
PlayerInfo[para1][pRank] = 0;
PlayerInfo[para1][pChar] = 0;
new rand = random(sizeof(CIV));
SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[para1][pModel] = CIV[rand];
MedicBill[para1] = 0;
SpawnPlayer(para1);
format(string, sizeof(string), " You kick out %s from your mafia.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else return SCM(playerid, COLOR_RED, "you can not kick out meamber that he isnt in your org.i!");
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You can do that(Leaders only)!");
}
}
return 1;
}
Are you need something else from script?