2 question -
nbx2000 - 18.02.2019
hi guys a question how do you disable setplayerteam after dying in a event? and it is possible to modify the getall to bring the team H example
#define TEAM_Z 1
#define TEAM_H 2
CMD
etr(playerid,params[])
{
new id;
if(PlayerInfo[playerid][Level] < 6) return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_GREY,"USAGE:/setr [playerid]");
SetPlayerTeam(id,TEAM_Z);
SendClientMessage(id,COLOR_RED,"Your team has been set to RED by an Admin.");
SetPlayerColor(id, red);
SetPlayerSkin(id, 162);
return 1;
}
CMD:getall(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 10 || IsPlayerAdmin(playerid)) {
CMDMessageToAdmins(playerid,"GETALL");
new Float
,Float:y,Float:z, interior = GetPlayerInterior(playerid);
GetPlayerPos(playerid,x,y,z);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && (i != playerid) && i != ServerInfo[MaxAdminLevel]) {
PlayerPlaySound(i,1057,0.0,0.0,0.0); SetPlayerPos(i,x+(playerid/4)+1,y+(playerid/4),z); SetPlayerInterior(i,interior);
}
}
new string[128]; format(string,sizeof(string),"Administrator \"%s\" has teleported all players", pName(playerid) );
return SendClientMessageToAll(blue, string);
} else return SendClientMessage(playerid,red,"ERROR: You need to be level 10 to use this command");
}
Re: 2 question -
ComDuck - 18.02.2019
What do you mean by disabling SetPlayerTeam? And you can modify your getall command to include a parameter that allows you to teleport specific teams.
Plus, why:
in your getall command? I have never experienced the compiler throwing any unused params warning for ZCMD.
Re: 2 question -
nbx2000 - 18.02.2019
Quote:
Originally Posted by ComDuck
What do you mean by disabling SetPlayerTeam? And you can modify your getall command to include a parameter that allows you to teleport specific teams.
Plus, why:
in your getall command? I have never experienced the compiler throwing any unused params warning for ZCMD.
|
Not bro
There is no team when a player dies in minigame or event. I would put it on onplayerspawn and onplayerdeath. Are both correct?
here
SetPlayerTeam(playerid,NO_TEAM);
SetPlayerTeam(playerid,-255);
Re: 2 question -
nbx2000 - 18.02.2019
Thanks bro done close