public OnPlayerDisconnect(playerid, reason)
{
KillTimer(savespawn[playerid]);
KillTimer(titi);
foreach(Player,i)
{
FazendoTeste[i] = 0;
SalvarPlayer(i);
}
SaveCar(playerid);
MSG_Preso[playerid] = 0;
KillTimer(timerDominando[playerid]);
if(dominando[playerid] == 1)
{
if(gzDominando[playerid] == 1)
GangZoneShowForAll(GZFavela, CORTR_NINGUEM);
if(gzDominando[playerid] == 2)
GangZoneShowForAll(GZParque, CORTR_NINGUEM);
if(gzDominando[playerid] == 3)
GangZoneShowForAll(GZEstacao, CORTR_NINGUEM);
if(gzDominando[playerid] == 4)
GangZoneShowForAll(GZCasarao, CORTR_NINGUEM);
if(gzDominando[playerid] == 5)
GangZoneShowForAll(GZRoda, CORTR_NINGUEM);
}
PlayerCuffed[playerid] = 0;
InfoGabriel[playerid][pKeyCar] = -1;
InfoGabriel[playerid][pAdmin] = 0; InfoGabriel[playerid][pLArma] = 0;
InfoGabriel[playerid][pNivel] = 0; InfoGabriel[playerid][pMembro] = 0;
InfoGabriel[playerid][pGrana] = 0; InfoGabriel[playerid][pSkin] = 0;
InfoGabriel[playerid][pSexo] = 0; InfoGabriel[playerid][pVip] = 0;
InfoGabriel[playerid][pTutorial] = 0; InfoGabriel[playerid][pCamisinha] = 0;
InfoGabriel[playerid][pPais] = 0; InfoGabriel[playerid][pCorda] = 0;
InfoGabriel[playerid][pLCarro] = 0; InfoGabriel[playerid][pFita] = 0;
InfoGabriel[playerid][pLMoto] = 0; InfoGabriel[playerid][pGps] = 0;
InfoGabriel[playerid][pLAviao] = 0; InfoGabriel[playerid][pCigarro] = 0;
InfoGabriel[playerid][pBanco] = 0; InfoGabriel[playerid][pCadeia] = 0;
InfoGabriel[playerid][pMatou] = 0; InfoGabriel[playerid][pTempoCadeia] = 0;
InfoGabriel[playerid][pMorreu] = 0; InfoGabriel[playerid][pChaveCasa] = -1;
InfoGabriel[playerid][pSafeDroga] = 0; InfoGabriel[playerid][pRespeito] = 0;
InfoGabriel[playerid][pSenhaBanco] = 0; InfoGabriel[playerid][pHorasJogadas] = 0;
InfoGabriel[playerid][pLastLogin] = 0; InfoGabriel[playerid][pLastHour] = 0;
InfoGabriel[playerid][pColete] = 0; InfoGabriel[playerid][pMateriais] = 0;
InfoGabriel[playerid][pkeyBizz] = -1; InfoGabriel[playerid][pkeysBizz] = -1;
InfoGabriel[playerid][ptimeVip] = -1; InfoGabriel[playerid][pdiaVip] = -1;
InfoGabriel[playerid][pmesVip] = -1; InfoGabriel[playerid][panoVip] = -1;
InfoGabriel[playerid][pQuartoHotel] = 0;
InfoGabriel[playerid][ptimeSVip] = -1; InfoGabriel[playerid][pdiaSVip] = -1;
InfoGabriel[playerid][pmesSVip] = -1; InfoGabriel[playerid][panoSVip] = -1;
InfoGabriel[playerid][pNumver] = 0; InfoGabriel[playerid][pNumber] = 0;
InfoGabriel[playerid][pNivelProcurado] = 0; InfoGabriel[playerid][pMaxHealth] = 0;
InfoGabriel[playerid][pPos_x] = 1612.3240; PosicaoDeslogar[playerid] = 1;
InfoGabriel[playerid][pPos_y] = -2330.1670;
InfoGabriel[playerid][pPos_z] = 13.5469;
InfoGabriel[playerid][pPos_a] = 13.5469;
switch(reason)
{
case 0: format(String, 44, "%s crashou do servidor", pNome(playerid));
case 1: format(String, 60, "%s saiu do servidor por conta propria", pNome(playerid));
case 2: format(String, 60, "%s saiu do servidor kickado ou banido", pNome(playerid));
}
ProxDetectorDJ(playerid, String, COR_AMARELO, 80.0);
mandoumensagem[playerid] = 0;
if(Teste[playerid] == 1)
{
DestroyVehicle(V[playerid]);
}
return 1;
}
forward SalvarContas(playerid);
public SalvarContas(playerid)
{
if(fexist(Arquivo(playerid)))
{
new
day,
month,
year,
hour,
minu,
sec
;
getdate(day, month, year);
gettime(hour, minu, sec);
format(InfoGabriel[playerid][pLastLogin], 11, "%02d/%02d/%02d", year, month, day);
format(InfoGabriel[playerid][pLastHour], 9, "%02d:%02d:%02d", hour, minu, sec);
DOF2_SetInt(Arquivo(playerid), "Admin", InfoGabriel[playerid][pAdmin]);
DOF2_SetInt(Arquivo(playerid), "Level", InfoGabriel[playerid][pNivel]);
DOF2_SetInt(Arquivo(playerid), "Vip", InfoGabriel[playerid][pVip]);
DOF2_SetInt(Arquivo(playerid), "Banco", InfoGabriel[playerid][pBanco]);
DOF2_SetInt(Arquivo(playerid), "Emprego", InfoGabriel[playerid][pEmprego]);
DOF2_SetInt(Arquivo(playerid), "Dinheiro", GetPlayerMoneyEx(playerid));
DOF2_SetInt(Arquivo(playerid), "SkinAtual", InfoGabriel[playerid][pSkin]);
DOF2_SetInt(Arquivo(playerid), "Membro", InfoGabriel[playerid][pMembro]);
DOF2_SetInt(Arquivo(playerid), "Lider", InfoGabriel[playerid][pLider]);
DOF2_SetInt(Arquivo(playerid), "Cargo", InfoGabriel[playerid][pCargo]);
DOF2_SetInt(Arquivo(playerid), "Tutorial", InfoGabriel[playerid][pTutorial]);
DOF2_SetInt(Arquivo(playerid), "Sexo", InfoGabriel[playerid][pSexo]);
DOF2_SetInt(Arquivo(playerid), "Pais", InfoGabriel[playerid][pPais]);
DOF2_SetInt(Arquivo(playerid), "LCarro", InfoGabriel[playerid][pLCarro]);
DOF2_SetInt(Arquivo(playerid), "LMoto", InfoGabriel[playerid][pLMoto]);
DOF2_SetInt(Arquivo(playerid), "LAviao", InfoGabriel[playerid][pLAviao]);
DOF2_SetInt(Arquivo(playerid), "LArma", InfoGabriel[playerid][pLArma]);
DOF2_SetInt(Arquivo(playerid), "Camisinhas", InfoGabriel[playerid][pCamisinha]);
DOF2_SetInt(Arquivo(playerid), "Cordas", InfoGabriel[playerid][pCorda]);
DOF2_SetInt(Arquivo(playerid), "Fitas", InfoGabriel[playerid][pFita]);
DOF2_SetInt(Arquivo(playerid), "Cigarros", InfoGabriel[playerid][pCigarro]);
DOF2_SetInt(Arquivo(playerid), "Drogas", InfoGabriel[playerid][pDroga]);
DOF2_SetInt(Arquivo(playerid), "SafeDrogas", InfoGabriel[playerid][pSafeDroga]);
DOF2_SetInt(Arquivo(playerid), "Matou", InfoGabriel[playerid][pMatou]);
DOF2_SetInt(Arquivo(playerid), "Morreu", InfoGabriel[playerid][pMorreu]);
DOF2_SetInt(Arquivo(playerid), "GPS", InfoGabriel[playerid][pGps]);
DOF2_SetInt(Arquivo(playerid), "Cadeia", InfoGabriel[playerid][pCadeia]);
DOF2_SetInt(Arquivo(playerid), "TempoCadeia", InfoGabriel[playerid][pTempoCadeia]);
DOF2_SetInt(Arquivo(playerid), "KeyCarro", InfoGabriel[playerid][pKeyCar]);
DOF2_SetInt(Arquivo(playerid), "ChaveCasa", InfoGabriel[playerid][pChaveCasa]);
DOF2_SetInt(Arquivo(playerid), "SenhaBanco", InfoGabriel[playerid][pSenhaBanco]);
DOF2_SetInt(Arquivo(playerid), "Respeito", InfoGabriel[playerid][pRespeito]);
DOF2_SetInt(Arquivo(playerid), "HorasJogadas", InfoGabriel[playerid][pHorasJogadas]);
DOF2_SetInt(Arquivo(playerid), "VidaMax", InfoGabriel[playerid][pMaxHealth]);
DOF2_SetInt(Arquivo(playerid), "NivelProcurado", InfoGabriel[playerid][pNivelProcurado]);
DOF2_SetString(Arquivo(playerid), "UltimoLogin", InfoGabriel[playerid][pLastLogin]);
DOF2_SetString(Arquivo(playerid), "UltimaHora", InfoGabriel[playerid][pLastHour]);
DOF2_SetInt(Arquivo(playerid), "Colete", InfoGabriel[playerid][pColete]);
DOF2_SetInt(Arquivo(playerid), "Materiais", InfoGabriel[playerid][pMateriais]);
DOF2_SetInt(Arquivo(playerid), "keyBizz", InfoGabriel[playerid][pkeyBizz]);
DOF2_SetInt(Arquivo(playerid), "keysBizz", InfoGabriel[playerid][pkeysBizz]);
DOF2_SetInt(Arquivo(playerid), "timeVip", InfoGabriel[playerid][ptimeVip]);
DOF2_SetInt(Arquivo(playerid), "diaVip", InfoGabriel[playerid][pdiaVip]);
DOF2_SetInt(Arquivo(playerid), "mesVip", InfoGabriel[playerid][pmesVip]);
DOF2_SetInt(Arquivo(playerid), "anoVip", InfoGabriel[playerid][panoVip]);
DOF2_SetInt(Arquivo(playerid), "timeSVip", InfoGabriel[playerid][ptimeSVip]);
DOF2_SetInt(Arquivo(playerid), "timeSVip", InfoGabriel[playerid][ptimeSVip]);
DOF2_SetInt(Arquivo(playerid), "diaSVip", InfoGabriel[playerid][pdiaSVip]);
DOF2_SetInt(Arquivo(playerid), "mesSVip", InfoGabriel[playerid][pmesSVip]);
DOF2_SetInt(Arquivo(playerid), "anoSVip", InfoGabriel[playerid][panoSVip]);
DOF2_SetFloat(Arquivo(playerid), "Pos_x", InfoGabriel[playerid][pPos_x]);
DOF2_SetFloat(Arquivo(playerid), "Pos_y", InfoGabriel[playerid][pPos_y]);
DOF2_SetFloat(Arquivo(playerid), "Pos_z", InfoGabriel[playerid][pPos_z]);
DOF2_SetFloat(Arquivo(playerid), "Pos_a", InfoGabriel[playerid][pPos_a]);
DOF2_SetInt(Arquivo(playerid), "Hotel", InfoGabriel[playerid][pQuartoHotel]);
DOF2_SaveFile();
}
}
Porque nao tem GetPlayerPos? isso que pega as coordenadas do jogador
|
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(savespawn[playerid]);
KillTimer(titi);
FazendoTeste[playerid] = 0;
SalvarPlayer(playerid);
SaveCar(playerid);
MSG_Preso[playerid] = 0;
KillTimer(timerDominando[playerid]);
if(dominando[playerid] == 1)
{
if(gzDominando[playerid] == 1)
GangZoneShowForAll(GZFavela, CORTR_NINGUEM);
if(gzDominando[playerid] == 2)
GangZoneShowForAll(GZParque, CORTR_NINGUEM);
if(gzDominando[playerid] == 3)
GangZoneShowForAll(GZEstacao, CORTR_NINGUEM);
if(gzDominando[playerid] == 4)
GangZoneShowForAll(GZCasarao, CORTR_NINGUEM);
if(gzDominando[playerid] == 5)
GangZoneShowForAll(GZRoda, CORTR_NINGUEM);
}
ResetStats(playerid)
switch(reason)
{
case 0: format(String, 44, "%s crashou do servidor", pNome(playerid));
case 1: format(String, 60, "%s saiu do servidor por conta propria", pNome(playerid));
case 2: format(String, 60, "%s saiu do servidor kickado ou banido", pNome(playerid));
}
ProxDetectorDJ(playerid, String, COR_AMARELO, 80.0);
mandoumensagem[playerid] = 0;
if(Teste[playerid] == 1)
{
DestroyVehicle(V[playerid]);
}
return 1;
}
stock ResetStats(playerid)
{
PlayerCuffed[playerid] = 0;
InfoGabriel[playerid][pKeyCar] = -1;
InfoGabriel[playerid][pAdmin] = 0;
InfoGabriel[playerid][pNivel] = 0;
InfoGabriel[playerid][pGrana] = 0;
InfoGabriel[playerid][pSexo] = 0;
InfoGabriel[playerid][pTutorial] = 0;
InfoGabriel[playerid][pPais] = 0;
InfoGabriel[playerid][pLCarro] = 0;
InfoGabriel[playerid][pLMoto] = 0;
InfoGabriel[playerid][pLAviao] = 0;
InfoGabriel[playerid][pBanco] = 0;
InfoGabriel[playerid][pMatou] = 0;
InfoGabriel[playerid][pMorreu] = 0;
InfoGabriel[playerid][pSafeDroga] = 0;
InfoGabriel[playerid][pSenhaBanco] = 0;
InfoGabriel[playerid][pLastLogin] = 0;
InfoGabriel[playerid][pColete] = 0;
InfoGabriel[playerid][pkeyBizz] = -1;
InfoGabriel[playerid][ptimeVip] = -1;
InfoGabriel[playerid][pmesVip] = -1;
InfoGabriel[playerid][pQuartoHotel] = 0;
InfoGabriel[playerid][ptimeSVip] = -1;
InfoGabriel[playerid][pmesSVip] = -1;
InfoGabriel[playerid][pNumver] = 0;
InfoGabriel[playerid][pNivelProcurado] = 0;
InfoGabriel[playerid][pPos_x] = 1612.3240;
InfoGabriel[playerid][pPos_y] = -2330.1670;
InfoGabriel[playerid][pPos_z] = 13.5469;
InfoGabriel[playerid][pPos_a] = 13.5469;
InfoGabriel[playerid][pLArma] = 0;
InfoGabriel[playerid][pMembro] = 0;
InfoGabriel[playerid][pSkin] = 0;
InfoGabriel[playerid][pVip] = 0;
InfoGabriel[playerid][pCamisinha] = 0;
InfoGabriel[playerid][pCorda] = 0;
InfoGabriel[playerid][pFita] = 0;
InfoGabriel[playerid][pGps] = 0;
InfoGabriel[playerid][pCigarro] = 0;
InfoGabriel[playerid][pCadeia] = 0;
InfoGabriel[playerid][pTempoCadeia] = 0;
InfoGabriel[playerid][pChaveCasa] = -1;
InfoGabriel[playerid][pRespeito] = 0;
InfoGabriel[playerid][pHorasJogadas] = 0;
InfoGabriel[playerid][pLastHour] = 0;
InfoGabriel[playerid][pMateriais] = 0;
InfoGabriel[playerid][pkeysBizz] = -1;
InfoGabriel[playerid][pdiaVip] = -1;
InfoGabriel[playerid][panoVip] = -1;
InfoGabriel[playerid][pdiaSVip] = -1;
InfoGabriel[playerid][panoSVip] = -1;
InfoGabriel[playerid][pNumber] = 0;
InfoGabriel[playerid][pMaxHealth] = 0;
PosicaoDeslogar[playerid] = 1;
return 1;
}
fiz um novo code para vc (o.O Hoje to bomzinho)
sera que funfa?? e possivel pawn Код:
|