[AJUDA] Gamemode
#1

Ow galera porque quando eu do /preprr e reincio meu sv , todos do servidor estгo com ADM lvl max (level 6 no caso do meu servidor)

Vou mandar alguns publics:
pawn Код:
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, true);
ForceClassSelection(playerid);
SetPVarInt(playerid, "Intro", 0);
SetTimerEx("ShowIntro", 1000, 0, "d", playerid);
blockpm[playerid] = 0;
PlayerInfo[playerid][LoginsFalsos] = 0;
pAdmin[playerid] = 0;
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
dini_IntSet(file, "DM", 0);
TextDrawShowForPlayer(playerid, topblack);
TextDrawShowForPlayer(playerid, backblack);
CPSERVICE_actualcp[playerid] = 0;
AFK[playerid]=0;
multar[playerid]= 0;
autoescola[playerid] = 0;
nogame[playerid] = 0;
noevento[playerid] = 0;
PlayerInfo[playerid][Logged] = 0;
vip[playerid] = 0;
guard[playerid] = 0;
GPS_Spawned[playerid] = 0;
DMLiberado[playerid] = 0;
Mute[playerid] = 0;
SpawnPlayer(playerid);
//news
new Pname[MAX_PLAYER_NAME];
new string[256];
new sstring[256];
//============================================================================================================
if(dini_Int("nickban.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi banido Motivo: Vocк estб banido!");
format(sstring, sizeof(sstring), "%s (%d) Foi banido |Motivo|: Conta estб banida!", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
if(dini_Int("banidos.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi kickado |Motivo|: Conta estб banida!");
format(sstring, sizeof(sstring), "%s (%d) Foi kickado |Motivo|: Conta estб banida", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
StopAudioStreamForPlayer(playerid);
new aname[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
new Pname[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),"Contas/%s.ini",name);
new grana;
grana = GetPlayerMoney(playerid);
dini_IntSet(file, "Dinheiro", grana);
dini_IntSet(file, "LevelAdmin", pAdmin[playerid]);
GetPlayerName(playerid, Pname, sizeof(Pname));
switch(reason)
{
case 0: format(string, sizeof(string), "» %s saiu do servidor (Queda de conexгo)", Pname);
case 1: format(string, sizeof(string), "» %s saiu do servidor (Vontade Prуpria)", Pname);
case 2: format(string, sizeof(string), "» %s saiu do servidor (Kickado ou Banido)", Pname);
}
Mute[playerid] = 0;
SendClientMessageToAll(C_Temac, string);
TextDrawHideForPlayer(playerid, Relogio);
new Interior;
Interior = GetPlayerInterior(playerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CPSERVICE_actualcp[playerid] = 0;
dini_IntSet(file, "Dinheiro", grana);
dini_IntSet(file,"Continuar",1);
dini_FloatSet(file,"ContinuarX",Float:X);
dini_FloatSet(file,"ContinuarY",Float:Y);
dini_FloatSet(file,"ContinuarZ",Float:Z);
dini_IntSet(file,"ContinuarI",Interior);
dini_IntSet(file, "convitent", 0);
dini_IntSet(file, "Entrevista", 0);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6)
{
new AdminName[MAX_PLAYER_NAME];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
format(string, sizeof(string), "~w~%s: ~r~ADM ~p~OFFLINE", AdminName);
for(new i=0; i<MAX_PLAYERS; i++)
{
GameTextForPlayer(i, string , 5000, 3);
}
}
if(InCall[playerid]==1)
{
if(playerid==sender)
{
InCall[gc]=0,GetCall[gc]=0; InCall[sender]=0,GetCall[sender]=0;
SetPlayerSpecialAction(gc,SPECIAL_ACTION_STOPUSECELLPHONE);
format(str3,128,"%s desligou o celular!",GetName(sender));
SendClientMessage(gc,GRAY,str3);
} else if(playerid == gc)
{
InCall[gc]=0,GetCall[gc]=0; InCall[sender]=0,GetCall[sender]=0;
SetPlayerSpecialAction(sender,SPECIAL_ACTION_STOPUSECELLPHONE);
format(str3,128,"%s estб fora de area por sair da Cidade!",GetName(gc));
SendClientMessage(sender,GRAY,str3);
}
}
minutos[playerid] = 0;
Conversa[playerid] = 0;
NaFaculdade[playerid] = 0;
return 1;
}
pawn Код:
if(strcmp(cmd, "/preprr", true) == 0)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "[INFO] O Administrador %s (%d) estб preparando o servidor para reniciar, Seus Dados Foram Salvos!", aname,playerid);
    SendClientMessageToAll(GREEN, string);
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(pAdmin[playerid] > 4)
        {
            new pname[MAX_PLAYER_NAME];
            GetPlayerName(i, pname, MAX_PLAYER_NAME);
            format(file, sizeof(file), PASTA_CONTAS, pname);
            new grana;
            grana = GetPlayerMoney(i);
            dini_IntSet(file, "Dinheiro", grana);
            dini_IntSet(file, "LevelAdmin", pAdmin[playerid]);
        }
    }
    return 1;
}
Precisa de algo? So PEDIR!
Reply


Messages In This Thread
[AJUDA] Gamemode - by GuiihCamargo - 10.03.2012, 00:56
Re : [AJUDA] Gamemode - by steeldark - 10.03.2012, 00:59
Re: Re : [AJUDA] Gamemode - by GuiihCamargo - 10.03.2012, 01:07

Forum Jump:


Users browsing this thread: 1 Guest(s)