/invite command
#3

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

PHP код:
CMD:invite(playerid,params[])
{
    if(
pInfo[playerid][pLeader] == 0)return SendClientMessage(playerid,FactColor[11],"You need to be a leader to use that command!");
    new 
Reciver;
    if(
sscanf(params,"u",Reciver))return SendClientMessage(playerid,FactColor[11],"Usage: /invite [PlayerID/PartOfName]");
    if(
Reciver == playerid)return SendClientMessage(playerid,FactColor[11],"You can't invite yourself!");
    if(!
IsPlayerConnected(Reciver))return SendClientMessage(playerid,FactColor[11],"That player isn't connected!");
    if(
pInfo[Reciver][pFaction] > 0)return SendClientMessage(playerid,FactColor[11],"That player is already in a faction!");
    
pInfo[Reciver][pFaction] = pInfo[playerid][pLeader];
    
pInfo[Reciver][pRank] = 1;
    
INI_WriteInt(INI_Open(UserPath(Revier)),"Faction",pInfo[playerid][pLeader]);
    
INI_WriteInt(INI_Open(UserPath(Reciver)),"Rank",1);
    
INI_Close(INI_Open(UserPath(Reciver)));
    new 
string[2][145];
    
format(string[0],sizeof string[0],"You have been invited by %s in %s!",Name(playerid),pFacts[pInfo[playerid][pLeader]]);
    
format(string[1],sizeof string[1],"You invited %s in your faction!",Name(Reciver));
    
SendClientMessage(playerid,FactColor[10],string[1]);
    
SendClientMessage(Reciver,FactColor[10],string[0]);
    
SetPlayerColor(Reciver,FactColor[pInfo[playerid][pFaction]]);
    
ForceClassSelection(Reciver);
    
SetPlayerHealth(Reciver,0.0);
    return 
1;

don't work , the same problem ..
Reply


Messages In This Thread
/invite command - by Mariciuc223 - 26.07.2015, 21:00
AW: /invite command - by Mencent - 26.07.2015, 21:08
Re: AW: /invite command - by Mariciuc223 - 26.07.2015, 21:49

Forum Jump:


Users browsing this thread: 1 Guest(s)