Adding to team via cmd - Dini
#6

This code is better btw.
pawn Код:
COMMAND:setteam(playerid, params[])
{
    new id, pTeam, string[64], name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][AdminLevel] >= 106)
    {
        if(sscanf(params, "ud", id, pTeam)) return SendClientMessage(playerid, -1, "USAGE: /setteam [PlayerId/PartOfName] [Team]");
        if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player Not Found");
        if(pTeam > 5) return SendClientMessage(playerid, -1,"ERROR: Invalid Team, Avaliable Teams: 1, 2, 3, 4, 5");
        GetPlayerName(playerid, name, sizeof(name));
        GetPlayerName(id, PlayerName, sizeof(PlayerName));
        format(string, sizeof(string), "%s Has Make You Member Of Team %d .", name, pTeam);
        SendClientMessage(id, -1, string);
        format(string, sizeof(string), "You Gave %d Team Member %s .", pTeam, PlayerName);
        SendClientMessage(playerid, -1, string);
        PlayerInfo[id][Team] = pTeam;
    }
    else return SendClientMessage(playerid, -1, "You are not allowed to use this command.");
    return 1;
}
Reply


Messages In This Thread
Adding to team via cmd - Dini - by DJGama101 - 27.03.2011, 08:13
Re: Adding to team via cmd - Dini - by HyperZ - 27.03.2011, 08:16
Re: Adding to team via cmd - Dini - by ricardo178 - 27.03.2011, 08:18
Re: Adding to team via cmd - Dini - by DJGama101 - 27.03.2011, 08:22
Re: Adding to team via cmd - Dini - by Markx - 27.03.2011, 08:24
Re: Adding to team via cmd - Dini - by HyperZ - 27.03.2011, 08:28
Re: Adding to team via cmd - Dini - by DJGama101 - 27.03.2011, 08:29
Re: Adding to team via cmd - Dini - by ricardo178 - 27.03.2011, 08:29
Re: Adding to team via cmd - Dini - by HyperZ - 27.03.2011, 08:31
Re: Adding to team via cmd - Dini - by DJGama101 - 27.03.2011, 08:36

Forum Jump:


Users browsing this thread: 1 Guest(s)