07.06.2009, 09:41
Hey there,
My script which is pretty basic(only 700 lines or so) runs perfectly on Windows but in Linux it connects fine, but when you spawn the whole server crashes. In the log there is no record of this it just says Incoming Connection and then that's the last line in the log before the server restarts itself. I believe the issue to be within OnPlayerSpawn, but I could be wrong.
Here's the code:
Any help on what's the issue here is appreciated.
Regards
My script which is pretty basic(only 700 lines or so) runs perfectly on Windows but in Linux it connects fine, but when you spawn the whole server crashes. In the log there is no record of this it just says Incoming Connection and then that's the last line in the log before the server restarts itself. I believe the issue to be within OnPlayerSpawn, but I could be wrong.
Here's the code:
Код:
public OnPlayerSpawn(playerid) { SetPlayerInterior(playerid, 0); GangZoneShowForPlayer(playerid, PD, 0xFFFF0096); GangZoneShowForPlayer(playerid, GANG, 0x00000096); PICKUPGUN = CreatePickup(361, 23, 1294.2100,2797.0854,10.8220); //Flamethrower in the centre PICKUPHEALTH2 = CreatePickup(1240, 23, 1186.7932,2757.8452,10.8281); //Health for team 1 PICKUPHEALTH1 = CreatePickup(1240, 23, 1354.1555,2781.8418,10.8203); //Health for team 2 SetPlayerArmour(playerid, 100.0); new s[120]; format(s,10,"Team 2: %d",greenscore); TextDrawSetString(ScoreGreen,s); format(s,20,"Team 1: %d",redscore); TextDrawSetString(ScoreRed,s); ////////////////////////////////// if(gTeam[playerid] == TEAM_GANG) { SetPlayerColor(playerid,COLOR_GREEN); // DisablePlayerCheckpoint(playerid); PICKUPP = CreatePickup(1210, 23, 1378.8456,2752.9397,10.2196); //FLAG PICKUPA = CreatePickup(1210, 23, 1141.4272,2741.7739,10.8197); //FLAG2 GameTextForPlayer(playerid, "Capture the enemies flag and return it to our base", 6000, 0); playerarmy[playerid]=0; playerpolice[playerid]=0; SetPlayerCheckpoint(playerid,1378.8456,2752.9397,10.2196); //TextDrawHideForPlayer(playerid,Textdraw0); } if(gTeam[playerid] == TEAM_GANG2) { SetPlayerColor(playerid,COLOR_BLUE); // DisablePlayerCheckpoint(playerid); PICKUPP = CreatePickup(1210, 23, 1378.8456,2752.9397,10.2196); //FLAG PICKUPA = CreatePickup(1210, 23, 1141.4272,2741.7739,10.8197); //FLAG2 GameTextForPlayer(playerid, "Capture the enemies flag and return it to our base", 6000, 0); playerarmy[playerid]=0; playerpolice[playerid]=0; SetPlayerCheckpoint(playerid,1141.4272,2741.7739,10.8197); //TextDrawHideForPlayer(playerid,Textdraw0); } return 1; }
Regards