SA-MP Forums Archive
Server Help - 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 Help (/showthread.php?tid=405345)



Server Help - Dark Killer - 06.01.2013

Hello ,

I just made a script which worked fine on my pc
Than i gave it to my server hoster who hosted it on linux
Everything was looking fine but as when i logged in the server and spawned the server Crashed.I thought this is a bug in my scripting ( maybe it is true ) but while i just hosted it in my computer my friend joined and everything was fine.

According to me it is Linux problem.
Can anyone just help me to fix that?
All linux plugins are working

Pulkit


Re: Server Help - park4bmx - 06.01.2013

wheres your debugging info ?


Re: Server Help - Dark Killer - 06.01.2013

I didn't tried any type of crashdetector :P i didn't got the link :/


Re: Server Help - park4bmx - 06.01.2013

you dont need it.
just put printf's on the "OnPLayerConnect"(or where u think the problem might be) after function and that's the way you would know when it stops responding/crashed

and check your information until you get close enough to the problem.

Also before that have a look at your Server_log if its saying anything.


Re: Server Help - Dark Killer - 06.01.2013

i guess the problem is in OnPlayerSpawn cause before spawning everything worked fine

Код:
public OnPlayerSpawn(playerid)
{
new PName[26];
GetPlayerName(playerid,PName,26);
new string[256];
IsSpawned[playerid] = 1;
GangZoneShowForPlayer(playerid, A99Zone, 0xEE113EC8);
GangZoneShowForPlayer(playerid, GrZone, 0x1EE158C8);
GangZoneShowForPlayer(playerid, CopZone,0x0033FFC8);

if(gTeam[playerid] == TEAM_A99)
{
    SetPlayerSkin(playerid,18);
    TextDrawShowForPlayer(playerid,Team[playerid]);
    format(string,256, "~g~G~y~A~g~N~y~G~n~~n~~r~Anarchy");
    new rnd = random(sizeof(SpawnPoints));
    SetPlayerPos(playerid,SpawnPoints[rnd][0],SpawnPoints[rnd][1],SpawnPoints[rnd][2]);
    TextDrawSetString(by,"~w~©P~w~u~w~lk~w~i~w~t 2012");
    SetPlayerFacingAngle(playerid,SpawnPoints[rnd][3]);
    TextDrawSetString(Team[playerid],string);
}
if(gTeam[playerid] == TEAM_GR)
{
    SetPlayerSkin(playerid,19);
    TextDrawShowForPlayer(playerid,Team[playerid]);
    format(string,256, "~g~G~y~A~g~N~y~G~n~~n~~r~Ghost Riders");
    TextDrawSetString(by,"~w~©P~w~u~w~lk~w~i~w~t 2012");
    TextDrawSetString(Team[playerid],string);
    new rnd = random(sizeof(SpawnPoints2));
    SetPlayerPos(playerid,SpawnPoints2[rnd][0],SpawnPoints2[rnd][1],SpawnPoints2[rnd][2]);
    SetPlayerFacingAngle(playerid,SpawnPoints2[rnd][3]);
}
if(gTeam[playerid] == TEAM_NATO)
{
    SetPlayerSkin(playerid,164);
    TextDrawShowForPlayer(playerid,Team[playerid]);
    format(string,256, "~g~C~y~L~g~A~y~S~g~S~n~~n~~r~Nato!!");
    TextDrawSetString(by,"~w~©P~w~u~w~lk~w~i~w~t 2012");
    TextDrawSetString(Team[playerid],string);

}
if(hasclass[playerid] == 0)
{
if(gTeam[playerid] != TEAM_NATO)
{
  ShowPlayerDialog(playerid, DIALOG_SC, DIALOG_STYLE_LIST,""COL_WHITE"Pick up a class","Chief Enforcer\nHitman\nStreet Soldier\nSpotter","OK","");
}
if(gTeam[playerid] == TEAM_NATO)
{
  ShowPlayerDialog(playerid, DIALOG_SNC, DIALOG_STYLE_LIST,""COL_WHITE"Pick up a class","Army\nFBI\nCop","OK","");
}
}
new pname[26];
GetPlayerName(playerid,pname,26);
format(string, sizeof(string), "7[SPAWN] %s(%d)",pname,playerid);
IRC_GroupSay(gGroupID, IRC_CHANNEL,string);

return 1;
}



Re: Server Help - eesh - 06.01.2013

try commenting out the IRC function?


Re: Server Help - Dark Killer - 06.01.2013

But if the server works fine in PC then why not in linux??