Mod koji koristim: od 0
Problem: Imam textdrawove na serveru i sve lepo radi, ja udjem na srv i sve je ok dok ne udje jedan moj drug koji ima neki problem pa cim udje prestane mu samp raditi i tada meni nestane "Monaco" textdraw. Gledao sam pod OnGameModeExit se unisti taj TD, znate li u cemu je problem?
Dio skripte: Sta treba? Gledao sam da li se svaki textdraw iz tog logo-a unisti na gamemodeexit i unisti se, ne znam u cemu je problem.
Slika/Video:
Kada udjem na srv:
(http://www.zaslike.com/files/7pjj2lrnh480kkcbnjvo.png)
Kad udje moj drug kojeg odma izbaci jer ima problem sa samp-om nesto:
(http://www.zaslike.com/files/tvs0p80kouxs42lb7vl.png)
Postaj OnPlayerDisconnect callback.
public OnPlayerDisconnect(playerid, reason)
{
new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); format(file,sizeof(file),PlayerFile,Name);
dini_IntSet(file,"Deposit",PlayerData[playerid][Deposit]);
player[playerid][caller] = 255;
player[playerid][calling] = false;
Lights[playerid]=0;
Trunk[playerid]=0;
Hood[playerid]=0;
Alarm[playerid]=0;
Engine[playerid]=0;
KillTimer(MinTimer);
TextDrawDestroy(Oglas0[playerid]);
TextDrawDestroy(Oglas1[playerid]);
TextDrawDestroy(Oglas2[playerid]);
TextDrawDestroy(Reg0[playerid]);
TextDrawDestroy(Reg1[playerid]);
TextDrawDestroy(Reg2[playerid]);
TextDrawDestroy(Reg3[playerid]);
TextDrawDestroy(Reg4[playerid]);
TextDrawDestroy(Reg5[playerid]);
TextDrawDestroy(LockTD0[playerid]);
TextDrawDestroy(LockTD1[playerid]);
TextDrawDestroy(LockTD2[playerid]);
TextDrawDestroy(LockTD3[playerid]);
TextDrawDestroy(LockTD4[playerid]);
TextDrawDestroy(LockTD5[playerid]);
TextDrawDestroy(LockTD6[playerid]);
TextDrawDestroy(hUp[playerid]);
TextDrawDestroy(Spec0[playerid]);
TextDrawDestroy(Spec1[playerid]);
TextDrawDestroy(bul0[playerid]); //logo
TextDrawDestroy(bul1[playerid]); //logo
TextDrawDestroy(bul2[playerid]); //logo
TextDrawDestroy(bul3[playerid]); //logo
TextDrawDestroy(bul4[playerid]); //logo
if(Joined[playerid] == true)
{
JoinCount--;
Joined[playerid] = false;
DestroyVehicle(CreatedRaceVeh[playerid]);
DisablePlayerRaceCheckpoint(playerid);
TextDrawHideForPlayer(playerid, RaceInfo[playerid]);
CPProgess[playerid] = 0;
KillTimer(InfoTimer[playerid]);
#if defined RACE_IN_OTHER_WORLD
SetPlayerVirtualWorld(playerid, 0);
#endif
}
TextDrawDestroy(RaceInfo[playerid]);
if(BuildRace == playerid+1) BuildRace = 0;
SacuvajIgraca(playerid);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
INI_WriteInt(File,"AdminLevel",PlayerInfo[playerid][pAdminLevel]);
INI_WriteInt(File,"GameSageLevel",PlayerInfo[playerid][pGameSageLevel]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Broj",PlayerInfo[playerid][pNumber]);
INI_WriteInt(File,"Min",PlayerInfo[playerid][pMin]);
INI_WriteInt(File,"XP",PlayerInfo[playerid][pXP]);
INI_WriteInt(File,"Mobilni",PlayerInfo[playerid][pMobile]);
INI_WriteInt(File,"Godine",PlayerInfo[playerid][pAge]);
INI_WriteInt(File,"Posao",PlayerInfo[playerid][pJob]);
INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
INI_WriteInt(File,"Respekti",PlayerInfo[playerid][pRespekti]);
INI_WriteString(File,"Zemlja",PlayerInfo[playerid][pFrom]);
INI_WriteString(File,"Sex",PlayerInfo[playerid][pSex]);
INI_WriteString(File,"E-Mail",PlayerInfo[playerid][pMail]);
INI_WriteInt(File,"Lider",PlayerInfo[playerid][pLider]);
INI_WriteInt(File,"Mats",PlayerInfo[playerid][pMats]);
INI_WriteInt(File,"Droga",PlayerInfo[playerid][pDroga]);
INI_WriteInt(File,"Clan",PlayerInfo[playerid][pClan]);
INI_WriteInt(File,"Org",PlayerInfo[playerid][pOrg]);
INI_WriteInt(File,"Warn",PlayerInfo[playerid][Warn]);
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
INI_WriteInt(File,"Vozilo1", PlayerInfo[playerid][Vozilo1]);
INI_WriteInt(File,"Vozilo2", PlayerInfo[playerid][Vozilo2]);
INI_WriteInt(File,"Vozilo3", PlayerInfo[playerid][Vozilo3]);
INI_Close(File);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); format(file,sizeof(file),PlayerFile,Name);
dini_IntSet(file,"Deposit",PlayerData[playerid][Deposit]);
player[playerid][caller] = 255;
player[playerid][calling] = false;
Lights[playerid]=0;
Trunk[playerid]=0;
Hood[playerid]=0;
Alarm[playerid]=0;
Engine[playerid]=0;
KillTimer(MinTimer);
TextDrawDestroy(Oglas0[playerid]);
TextDrawDestroy(Oglas1[playerid]);
TextDrawDestroy(Oglas2[playerid]);
TextDrawDestroy(Reg0[playerid]);
TextDrawDestroy(Reg1[playerid]);
TextDrawDestroy(Reg2[playerid]);
TextDrawDestroy(Reg3[playerid]);
TextDrawDestroy(Reg4[playerid]);
TextDrawDestroy(Reg5[playerid]);
TextDrawDestroy(LockTD0[playerid]);
TextDrawDestroy(LockTD1[playerid]);
TextDrawDestroy(LockTD2[playerid]);
TextDrawDestroy(LockTD3[playerid]);
TextDrawDestroy(LockTD4[playerid]);
TextDrawDestroy(LockTD5[playerid]);
TextDrawDestroy(LockTD6[playerid]);
TextDrawDestroy(hUp[playerid]);
TextDrawDestroy(Spec0[playerid]);
TextDrawDestroy(Spec1[playerid]);
TextDrawHideForPlayer(playerid, bul0[playerid]); //logo
TextDrawHideForPlayer(playerid, bul1[playerid]); //logo
TextDrawHideForPlayer(playerid, bul2[playerid]); //logo
TextDrawHideForPlayer(playerid, bul3[playerid]); //logo
TextDrawHideForPlayer(playerid, bul4[playerid]); //logo
if(Joined[playerid] == true)
{
JoinCount--;
Joined[playerid] = false;
DestroyVehicle(CreatedRaceVeh[playerid]);
DisablePlayerRaceCheckpoint(playerid);
TextDrawHideForPlayer(playerid, RaceInfo[playerid]);
CPProgess[playerid] = 0;
KillTimer(InfoTimer[playerid]);
#if defined RACE_IN_OTHER_WORLD
SetPlayerVirtualWorld(playerid, 0);
#endif
}
TextDrawDestroy(RaceInfo[playerid]);
if(BuildRace == playerid+1) BuildRace = 0;
SacuvajIgraca(playerid);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
INI_WriteInt(File,"AdminLevel",PlayerInfo[playerid][pAdminLevel]);
INI_WriteInt(File,"GameSageLevel",PlayerInfo[playerid][pGameSageLevel]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Broj",PlayerInfo[playerid][pNumber]);
INI_WriteInt(File,"Min",PlayerInfo[playerid][pMin]);
INI_WriteInt(File,"XP",PlayerInfo[playerid][pXP]);
INI_WriteInt(File,"Mobilni",PlayerInfo[playerid][pMobile]);
INI_WriteInt(File,"Godine",PlayerInfo[playerid][pAge]);
INI_WriteInt(File,"Posao",PlayerInfo[playerid][pJob]);
INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
INI_WriteInt(File,"Respekti",PlayerInfo[playerid][pRespekti]);
INI_WriteString(File,"Zemlja",PlayerInfo[playerid][pFrom]);
INI_WriteString(File,"Sex",PlayerInfo[playerid][pSex]);
INI_WriteString(File,"E-Mail",PlayerInfo[playerid][pMail]);
INI_WriteInt(File,"Lider",PlayerInfo[playerid][pLider]);
INI_WriteInt(File,"Mats",PlayerInfo[playerid][pMats]);
INI_WriteInt(File,"Droga",PlayerInfo[playerid][pDroga]);
INI_WriteInt(File,"Clan",PlayerInfo[playerid][pClan]);
INI_WriteInt(File,"Org",PlayerInfo[playerid][pOrg]);
INI_WriteInt(File,"Warn",PlayerInfo[playerid][Warn]);
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
INI_WriteInt(File,"Vozilo1", PlayerInfo[playerid][Vozilo1]);
INI_WriteInt(File,"Vozilo2", PlayerInfo[playerid][Vozilo2]);
INI_WriteInt(File,"Vozilo3", PlayerInfo[playerid][Vozilo3]);
INI_Close(File);
return 1;
}
Hvala nije bio u tome problem, ali svejedno pogledaj moju drugu temu sa parametrima. Hvala