Teleporting Team Problem
#1

Hey guys. I have these codes:

pawn Код:
CMD:ecmds(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"You need to be RCON admin to use this command");
SendClientMessage(playerid, GREEN,"*******************************");
SendClientMessage(playerid, -1,"Event Commands For RCON administrators");
SendClientMessage(playerid, -1,"  ");
SendClientMessage(playerid, -1,"/getteam [teamid], /gsteam [teamid] [scores], /freezeteam [teamid]");
SendClientMessage(playerid, -1,"/spawnteam [teamid]");
SendClientMessage(playerid, -1,"Team IDS: AUSTRALIA 0, India 1, RUSSIA 2 , USA 3, Pakistan 4 ");
SendClientMessage(playerid, -1,"       ");
SendClientMessage(playerid, GREEN,"**************************");
return 1;
}
CMD:getteam(playerid, params[])
{
new teamid[MAX_TEAMS];
if(sscanf(params,"i",teamid[0])) return SendClientMessage(playerid, RED,"Correct Usage: /getteam [teamid]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"You need to be RCON admin to use this command");
for(new i=0; i<GetMaxPlayers(); i++)
{
if(gTeam[i] == teamid[0])
{
if(IsPlayerConnected(i))
{
new Float:X,Float:Y,Float:Z,
interior = GetPlayerInterior(playerid),
world = GetPlayerVirtualWorld(playerid);
SetPlayerVirtualWorld(i, world);
SetPlayerInterior(i, interior);
GetPlayerPos(playerid, X,Y,Z);
SetPlayerPos(i, X+4,Y,Z);
new string[128], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, sizeof(aName));
format(string, sizeof(string),"Administrator %s has teleported team %s",aName, GetTeamName(i));
SendClientMessage(i, 0x515BC7AA, string);
}
}
}
return 1;
}
CMD:freezeteam(playerid, params[])
{
new teamid[MAX_TEAMS];
if(sscanf(params,"i",teamid[0])) return SendClientMessage(playerid, RED,"Correct Usage: /freezeteam [teamid]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"You need to be RCON admin to use this command");
for(new i=0; i<GetMaxPlayers(); i++)
{
if(gTeam[i] == teamid[0])
{
if(IsPlayerConnected(i))
{
TogglePlayerControllable(i, 0);
new string[128], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, sizeof(aName));
format(string, sizeof(string),"Administrator %s has frozen team %s",aName, GetTeamName(i));
SendClientMessage(i, 0x515BC7AA, string);
}
}
}
return 1;
}
CMD:spawnteam(playerid, params[])
{
new teamid[MAX_TEAMS];
if(sscanf(params,"i",teamid[0])) return SendClientMessage(playerid, RED,"Correct Usage: /spawnteam [teamid]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"You need to be RCON admin to use this command");
for(new i=0; i<GetMaxPlayers(); i++)
{
if(gTeam[i] == teamid[0])
{
if(IsPlayerConnected(i))
{
SpawnPlayer(i);
new string[128], aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, sizeof(aName));
format(string, sizeof(string),"Administrator %s has spawned team %s",aName, GetTeamName(i));
SendClientMessage(i, 0x515BC7AA, string);
}
}
}
return 1;
}
But only rcon admin can sue this cmd. i want admin with lvl 4 or greater than lvl4 can use this cmd. Not rcon admin.

Please i need seriously help
Reply
#2

you have to create a Register/Login system with enum containing kills, deaths, admins etc..
Reply
#3

oh bhai?? Are u mad?? I am not saying about login/register cmd. i am asking for event cmd....
Reply
#4

You said you want to make the command available for admin lvl 4 not to rcon admins.
Read your post next time.
Reply
#5

Quote:
Originally Posted by Romel
Посмотреть сообщение
You said you want to make the command available for admin lvl 4 not to rcon admins.
Read your post next time.
He hasn't said anything incorrectly,

ontopic : How does your admin system work?

i.e PlayerInfo[playerid][pAdmin] >= 4 ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)