Help with this command.
#1

pawn Код:
CMD:invite(playerid,params[])
{
    if(pInfo[playerid][pLeader] >= 1)
    {
        return SendClientMessage(playerid,-1,"You May not Use this command");
    }
    new ftext[50], pName[MAX_PLAYER_NAME],iName[MAX_PLAYER_NAME],id,string[128];
    if(sscanf(params,"u",id))
    {
        return SendClientMessage(playerid,-1,"USAGE:/invite [id/partofname]");
    }
    if(pInfo[playerid][pLeader] == 1)
    {
        ftext = "LSPD";
        SetPlayerSkin(id,288);
        pInfo[id][pMember] = pInfo[playerid][pLeader];
        pInfo[id][pRank] = 1;
    }
    else if(pInfo[playerid][pLeader] == 2)
    {
        ftext = "NCR";
        SetPlayerSkin(id,287);
        pInfo[id][pMember] = pInfo[playerid][pLeader];
        pInfo[id][pRank] = 1;
    }
    else
    {
    GetPlayerName(playerid,pName,sizeof(pName));
    GetPlayerName(id,iName,sizeof(iName));
    format(string,sizeof(string),"You Have been invited to %s by the Leader %s",ftext,pName);
    SendClientMessage(id,COLOR_BLUE,string);
    format(string,sizeof(string),"You have invited %s to Join %s",iName,ftext);
    SendClientMessage(playerid,COLOR_BLUE,string);
    }
    return 1;
}
I'm a leader of LSPD when i try to invite and budy its tall me You may not use this commad.
Reply
#2

Edit this part
pawn Код:
if(pInfo[playerid][pLeader] >= 1) return SendClientMessage(playerid,-1,"You May not Use this command");
    {
If that doesn't work, your /makeleader command will not be setting the pLeader as 1.
Reply
#3

pawn Код:
if(pInfo[playerid][pLeader] >= 1)
change it to:
pawn Код:
if(pInfo[playerid][pLeader] < 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)