Looking for "Team Change" script - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Looking for "Team Change" script (
/showthread.php?tid=159571)
Looking for "Team Change" script -
Rolyy - 13.07.2010
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
Re: Looking for "Team Change" script -
oliverrud - 13.07.2010
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.
Re: Looking for "Team Change" script -
Rolyy - 13.07.2010
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.
Re: Looking for "Team Change" script -
oliverrud - 13.07.2010
The warning just add
right after the dcmd_TeamChangeForAll
Re: Looking for "Team Change" script -
Rolyy - 13.07.2010
Thank you, That made it fix
.
Re: Looking for "Team Change" script -
oliverrud - 13.07.2010
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.