13.04.2012, 03:52
Ajuda ai, Vamos supor, dou admin level 5 pro id 2, e ele sai do servidor, aн o prуximo player que entra com id 2 fica com level 5 de adm!
;s
;s
Admin[playerid] = 0;
PlayerInfo[playerid][pAdmin] = 0;
PlayerInfo[playerid][pAdmin] = 0;
public OnPlayerDisconnect(playerid) {
format(string, 128, "%s.ini", Nome(playerid));
if(!dini_Exists(string)) dini_Create(string);
dini_IntSet(string, "Admin", PlayerInfo[playerid][pAdmin]);
return 1;
}
public OnPlayerConnect(playerid) {
PlayerInfo[playerid][pAdmin] = 0; //reseta a variavel
format(string, 128, "%s.ini", Nome(playerid));
if(dini_Exists(string)) {
PlayerInfo[playerid][pAdmin] = dini_Int(string, "Admin"); //seta o adminn
}
return 1;
}
stock Nome(p) {
new nome[24];
GetPlayerName(playerid, nome, 24); return nome;
}
pawn Код:
} |