18.02.2019, 15:16
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
CMDetr(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");
}
#define TEAM_Z 1
#define TEAM_H 2
CMDetr(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");
}