SA-MP Forums Archive
Server Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server Problem (/showthread.php?tid=442645)



Server Problem - Gold_Master - 08.06.2013

Hello!.
I have a problem when some one leave the server the server goes down My server is home server dont HOSTED
can some one help me?



Re: Server Problem - Mystique - 08.06.2013

Display your OnPlayerDisConnect callback.


Re: Server Problem - Gold_Master - 08.06.2013

public OnPlayerDisconnect(playerid, reason)
{
// TextDrawDestroy(GearInfo[playerid]);
// TextDrawDestroy(Textdraw12[playerid]);
HideGeneral(playerid);
// Loop(x, 6) TextDrawHideForPlayer(playerid, Gear[x]);

ShiftInfo[playerid] = (ShiftInfo[playerid] == false) ? (true) : (true);
KillTimer(ShiftTimer[playerid]);
SacuvajIgraca(playerid); //
gPlayerLogged[playerid] = 0; //Zacuvanje na statsi...
SaveAccounts(); //

new dateiname[MAX_PLAYER_NAME+4];
new playername[MAX_PLAYER_NAME];
new var[128];

gActivePlayers[playerid]--;
numplayers--;
if(reason == 0)
{
PlayerInfo[playerid][pCrashed] = 1;
for(new slot = 0; slot != 12; slot++)
{
new wep, ammo;
GetPlayerWeaponData(playerid, slot, wep, ammo);

if(wep != 0 && ammo != 0)
{
if(PlayerInfo[playerid][pGun1] == 0) { PlayerInfo[playerid][pGun1] = wep; PlayerInfo[playerid][pAmmo1] = ammo; }
else if(PlayerInfo[playerid][pGun2] == 0) { PlayerInfo[playerid][pGun2] = wep; PlayerInfo[playerid][pAmmo2] = ammo; }
else if(PlayerInfo[playerid][pGun3] == 0) { PlayerInfo[playerid][pGun3] = wep; PlayerInfo[playerid][pAmmo3] = ammo; }
else if(PlayerInfo[playerid][pGun4] == 0) { PlayerInfo[playerid][pGun4] = wep; PlayerInfo[playerid][pAmmo4] = ammo; }
}
}
}
SacuvajIgraca(playerid);
foreach (Player, i)


Re: Server Problem - Mystique - 08.06.2013

Next time, please use the [code] bbCode when posting a script. I can't really see a problem but if you use this method, I'm sure you can find the problem easily, it takes some time to set up but you'll see where the problem is.

https://sampwiki.blast.hk/wiki/Debugging


Re: Server Problem - Gold_Master - 08.06.2013

what should i do?


Re: Server Problem - Facerafter - 08.06.2013

Quote:
Originally Posted by Mystique
Посмотреть сообщение
Next time, please use the [code] bbCode when posting a script. I can't really see a problem but if you use this method, I'm sure you can find the problem easily, it takes some time to set up but you'll see where the problem is.

https://sampwiki.blast.hk/wiki/Debugging
Use [pawn] instead of [code] ^^

pawn Код:
//lol
Код:
 //lol



Re: Server Problem - Gold_Master - 13.06.2013

REFRESH


Re: Server Problem - Reggie_Bluntz - 13.06.2013

send me the file I fix it for you


Re: Server Problem - Reggie_Bluntz - 13.06.2013

this is not hard to fix


Re: Server Problem - Gold_Master - 13.06.2013

its not a filterscript this is gamemod