Question about y_groups
#3

Quote:
Originally Posted by Skorch
Посмотреть сообщение
pawn Код:
COMMAND:kick(playerid, params[])
{
    if(isnull(params))
    {
        SendClientMessage(playerid, 0x8094ABFF, "USAGE: /kick <player Id>");
    }
    else
    {
        if(IsPlayerConnected(strval(params))) // checking if the player is connected
        {
            if(Group_GetPlayer(/*group 'Id' here*/, strval(params)) == Group_GetPlayer(/*group 'Id' here*/, playerid)) // check if the player groups matches
            {
                Group_SetPlayer(/*group 'Id' here*/, strval(params), false); // remove the player from group
            }
        }
    }
    return true;
}
COMMAND:invite(playerid, params[])
{
    if(isnull(params))
    {
        SendClientMessage(playerid, 0x8094ABFF, "USAGE: /invite <player Id>");
    }
    else
    {
        if(IsPlayerConnected(strval(params))) // checking if the player is connected
        {
            Group_SetPlayer(/*group 'Id' here*/, strval(params), true); // invite the player to the group!
        }
    }
    return true;
}
You need to edit the CMD by yourself, but i gave you the base.
Don't know if there's any errors, didn't compile it.
Yea but still It has to save that THAT player is a member of that group, wouldnt Enums be needed?
Reply


Messages In This Thread
Question about y_groups - by iNorton - 25.11.2011, 18:47
Re: Question about y_groups - by WooTFTW - 25.11.2011, 18:57
Re: Question about y_groups - by iNorton - 25.11.2011, 19:04

Forum Jump:


Users browsing this thread: 1 Guest(s)