Little help! +Rep
#1

i want to make a command that if player is rcon admin then player enters command /giveteamscore then type the

name of the team like i have FBI and Killer this name i want it to be like when player types /giveteamscore [0] it will

be FBI as fbi is team 0 and team 1 is Killer /giveteamscore [1] so i want want if i use /giveteamscore [teamid] the team

will instantly get 1 score i don't want it that i need to put amount i directly want if i type /giveteamscore [teamid]

automatically 1 score will be given to team thanks!
Reply
#2

What command processor you use?
Reply
#3

ZCMD bro!
Reply
#4

This is the stock function for it:
pawn Код:
stock GiveTeamScore(teamid, score)
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(Team[i] = teamid)
        {
            SetPlayerScore(i, GetPlayerScore(i) + score);
        }
    }
}
Just make a command and add GiveTeamScore(teamid, score).
Reply
#5

does'nt work with the CMD can u show me with cmd CMD:GiveTeamScore plz!
Reply
#6

YCMD:
pawn Код:
CMD:giveteamscore(playerid,params[])
{
    if(PlayerAcc[playerid][AdminLevel] >= 5)//here your admin level
    {
        new teamid, score;
        if(!sscanf(params, "ui", teamid,score))
        {
            GiveTeamScore(teamid, score);
            new pstring[400];
            format(pstring,sizeof(pstring),"Admin %s has given team %s %d score",playerid,teamid,score);
            SendClientMessage(teamid,COLOR_YELLOW,pstring);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)