Help /giveteamcash [team] [money]
#2

Code can be made easyer i think!
pawn Код:
dcmd_giveteamcash(playerid, params[])
{
    new giveammount, teamid;
    new string[128];
   
    if(sscanf(params, "udi", targetid, teamid, giveammount)) return SendClientMessage(playerid, red, "error: /giveteamcash teamid ammount");

    if(teamid == 1)
    {
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(gTeam[i] == TEAMNAME) return GivePlayerMoney(i, giveammount);
    }
    if(teamid == 2)
    {
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(gTeam[i] == TEAMNAME) return GivePlayerMoney(i, giveammount);
    }
    return 1;
}
Reply


Messages In This Thread
Help /giveteamcash [team] [money] - by cca - 21.09.2010, 12:55
Re: Help /giveteamcash [team] [money] - by Seven. - 21.09.2010, 13:29
Re: Help /giveteamcash [team] [money] - by NoobScripter1 - 21.09.2010, 13:32
Re: Help /giveteamcash [team] [money] - by cca - 21.09.2010, 13:57
Re: Help /giveteamcash [team] [money] - by Seven. - 21.09.2010, 14:18
Re: Help /giveteamcash [team] [money] - by Leeroy. - 21.09.2010, 14:19
Re: Help /giveteamcash [team] [money] - by cca - 21.09.2010, 14:23
Re: Help /giveteamcash [team] [money] - by Seven. - 21.09.2010, 15:04
Re: Help /giveteamcash [team] [money] - by cca - 21.09.2010, 15:16
Re: Help /giveteamcash [team] [money] - by Seven. - 21.09.2010, 15:22

Forum Jump:


Users browsing this thread: 3 Guest(s)