Looking for "Team Change" script
#1

Looking for a DCMD command ("teamchangefor") for admins that when teams are unballanced that the admin uses a command to kill all players in the whole team which is unbalanced and let them rechoose team & character.

And Also another DCMD command ("teamchangeforall") for admins to make everyone rechoose team & character.

Thanks,
Rolyy
Reply
#2

Heres for TeamChangeForAll

pawn Код:
dcmd_teamchangeforall(playerid, params[])
{
if(PlayerInfo[playerid][Admin] >= 1)
    for(new i=0; i<MAX_PLAYERS; i++)
    {
     SendClientMessageToAll(COLOR_YELLOW,"TeamChangeForAll Initiated");
            SetPlayerHealth(i,0);
    }
}
else
{
 SendClientMessage(playerid,COLOR_YELLOW,"You are not a admin");
}
}
You have to do rest, I can't really do more.
Reply
#3

Thank you, I really appreciate this.

But I am still looking for the single team, kill and rechoose team & character one..
If I don't figure out myself..




EDIT: I'm getting one Warning from (I rather want it to get fixed then having 1 warning forever..)

Код:
(2468)dcmd_teamchangeforall(playerid, params[]){
(2469)    if(PlayerInfo[playerid][Level] >= 1) {
(2470)		for(new i=0; i<MAX_PLAYERS; i++){
(2471)			SendClientMessageToAll(yellow,"TeamChangeForAll Initiated");
(2472)			SetPlayerHealth(i,0);
(2473)		}
(2474)	} else { SendClientMessage(playerid,yellow,"ERROR: You are not a high enough level to use this commandn");
(2475)	}
(2476)}
Код:
C:\Users\USERNAME\Desktop\FILENAME\filterscripts\ladmin4v2.pwn(2468) : warning 203: symbol is never used: "params"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warnings.
Reply
#4

The warning just add
pawn Код:
#pragma unused params
right after the dcmd_TeamChangeForAll
Reply
#5

Thank you, That made it fix .
Reply
#6

For the TeamChangeFor

pawn Код:
dcmd_teamchangefor(playerid, params[])
{
if(PlayerInfo[playerid][Admin] >= 1)
{
new id;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
     if(sscanf(params,"i",id)) SendClientMessage(playerid,COLOR_YELLOW,"Usage: /teamchangefor [1-3]");
else
{
 if(id == 1)
{
 // Here you should check who are on team 1 (Whatever you want Team 1 to be, and then set their health to 0)
}
 if(id == 2)
{
 // Here you should check who are on team 2 (Whatever you want Team 2 to be, and then set their health to 0)
}
 if(id == 3)
{
 // Here you should check who are on team 3 (Whatever you want Team 3 to be, and then set their health to 0)
}
}
    }
}
else
{
 SendClientMessage(playerid,COLOR_YELLOW,"You are not a admin");
}
return 1;
}
Not sure if this would work just made it in the quick reply box, I doubt it, If you have any problems tell me, Anyways sorry that I didn't make a text one instead of [1-3] but just too bored to do that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)