04.09.2012, 10:27
(
Last edited by Gangster-rocks; 04/09/2012 at 11:37 AM.
)
pawn Code:
CMD:invite(playerid,params[])
{
new id,str[128],ftext[40],pName[32],vName[32];
if(pInfo[playerid][Leader] >= 1)
{
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"Usege: /invite [id]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED1,"Player not fond!!");
if(pInfo[id][Member] >= 1) return SendClientMessage(playerid,COLOR_RED1,"Player is a nother faction you can't invite him");
if(pInfo[playerid][Leader] == 1)
{
ftext = "LSPD";
}
else if(pInfo[playerid][Leader] == 2)
{
ftext = "FBI";
}
// go on here and add faction that u want
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,vName,sizeof(vName));
format(str,sizeof(str),"Leader %s Has invited you to %s",pName,ftext);
SendClientMessage(id,COLOR_LIGHTBLUE,str);
format(str,sizeof(str),"You have invited %s to %s",vName,ftext);
SendClientMessage(playerid,COLOR_LIGHTBLUE,str);
pInfo[id][Member] = pInfo[playerid][Leader];
pInfo[id][Rank] = 1;
}
return 1;
}