SA-MP Forums Archive
[HELP]/setteam - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]/setteam (/showthread.php?tid=359167)



[HELP]/setteam - Eiy Mard - 13.07.2012

i want make /setteam commands .. but dont know how ... i want make team1-cilvian team2-cops ... please can someone tell me how ?

Repp++


Re: [HELP]/setteam - leonardo1434 - 13.07.2012

Next time put your request in request's thread.
pawn Код:
CMD:setteam(playerid,params[])
{
    static
          id,
          team,
          name[25],
          namevictim[25],
          s_string[95] //its almost the size, its less i guess.
    ;
    if(sscanf(params,"ui",id,team) return SendClientMessage(playerid,-1,"/setteam [ID] [TEAM]");
    if(!IsPlayerConnected(id)return SendClientMessage(playerid,-1,"Player is not connected");
    yourteamvar[id] = team; // replace with your team var, and it is id cause its the victim instead of [playerid]
    GetPlayerName(playerid,name,25);
    GetPlayerName(id,namevictim,25);
    format(s_string,sizeof(s_string),"Administrator %s has set %s  to team %i",name,namevictim,team,);
    SendClientMessageToAll(-1,s_string);
    return 1;
}