17.12.2012, 10:27
When I run my server and straight join it I can join my server, but when I leave my server and join it back it says Joining it it never joins. And if I restart my server and join it again it works, help please
public EndCurrentRound(playerid) { SetPlayerCheckpoint(playerid, 1288.8518,1361.6448,10.8203, 3.0); if (GetPlayerTeam(playerid) == 0) { GameTextForPlayer(playerid,"~w~Evacuation Point opened! Please proceed to the ~r~red marker~w~ on your radar!",2500,0); SendClientMessageToAll(COLOR_GREEN, "Evacuation Point opened! Please proceed to the {FF0000}red marker{008000} on your radar"); } else if (GetPlayerTeam(playerid) == 1) { GameTextForPlayer(playerid,"~w~Evacuation Point opened! Prevent all the Humans from entering it!",2500,0); SendClientMessageToAll(COLOR_GREEN, "Evacuation Point opened! Pevent all the Humans from entering it!"); } KillTimer(NewRound); FinishRoundTimer = SetTimer("FinishRound",120000,false); TextDrawHideForAll(Textdraw0); } public FinishRound(playerid) { new ZombieCount = GetPlayersCountInTeam(Zombie); new WaitCount = GetPlayersCountInTeam(Wait); SetPlayerCameraPos(playerid, 1679.0748,1447.8893,47.7780); SetPlayerCameraLookAt(playerid, 1679.0748,1447.8893,47.7780); if (WaitCount < ZombieCount ) { SetTimer("ZombieWin",1,false); KillTimer(EndRound); } else if (ZombieCount < WaitCount) { SetTimer("HumanWin",1,false); KillTimer(EndRound); } SetPlayerTeam(playerid,0); NewRound = SetTimer("StartNewRound",4500,false); } public StartNewRound(playerid, killerid) { KillTimer(NewRound); KillTimer(Infect); KillTimer(FinishRoundTimer); KillTimer(EndRound); TogglePlayerControllable(playerid,0); SetCameraBehindPlayer(playerid); SendClientMessageToAll(COLOR_BLUE, "New Round Started!"); if(GetPlayerTeam(playerid) == 0) { ResetPlayerWeapons(playerid); SetPlayerTeam(playerid,0); SetPlayerColor(playerid,COLOR_BLUE); SetPlayerSkin(playerid,285); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 0); GivePlayerWeapon(playerid,24,56); GivePlayerWeapon(playerid,25,50); GivePlayerWeapon(playerid,31,150); GivePlayerWeapon(playerid,28,300); GivePlayerWeapon(playerid,17,5); GameTextForPlayer(playerid, "~r~Kill the Zombies!", 300, 0); new Random = random(sizeof(RandomSpawns)); SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]); SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]); } else if(GetPlayerTeam(playerid) == 3) { ResetPlayerWeapons(playerid); SetPlayerTeam(playerid,0); SetPlayerColor(playerid,COLOR_BLUE); SetPlayerSkin(playerid,285); SetPlayerHealth(playerid, 50000); SetPlayerArmour(playerid, 0); SendClientMessage(playerid, COLOR_GREEN, "{FF0000}Spawn Kill Protection Enabled!(Protected from damage for the next 4 seconds)"); SetTimer("AntiSpawnKill", 4000, false); SetPlayerChatBubble(playerid, "Spawn Protected!", COLOR_RED, 100.0, 4000); GivePlayerMoney(playerid, 10000); GivePlayerWeapon(playerid,24,56); GivePlayerWeapon(playerid,25,50); GivePlayerWeapon(playerid,31,150); GivePlayerWeapon(playerid,28,300); GivePlayerWeapon(playerid,17,5); GameTextForPlayer(playerid, "~r~Kill all the Zombies!", 300, 0); new Random = random(sizeof(RandomSpawns)); SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]); SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]); } GivePlayerMoney(playerid, 3000); DisablePlayerCheckpoint(playerid); SetTimer("Movement",2500, false); SetTimer("timeupdate",15000,true); SetTimer("infect", 35000, false); EndRound = SetTimer("EndCurrentRound",30000,false); KillTimer(NewRound); Textdraw0 = TextDrawCreate(17.000000, 429.000000, "0:30"); TextDrawBackgroundColor(Textdraw0, 0xFFFFFFFF); TextDrawFont(Textdraw0, 2); TextDrawLetterSize(Textdraw0, 0.500000, 1.000000); TextDrawColor(Textdraw0, 0x000000FF); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); TimeM = 0; TimeS = 30; Time = SetTimer("RoundTime", 1000, true); } public Movement(playerid) { TogglePlayerControllable(playerid,1); } public timeupdate() { SetWeather(09); SetWorldTime(02); } public infect() { new randomplayer; do { randomplayer = random(MAX_PLAYERS); } while(!IsPlayerConnected(randomplayer)); TogglePlayerControllable(randomplayer,0); ResetPlayerWeapons(randomplayer); SetPlayerTeam(randomplayer,1); SetPlayerColor(randomplayer,COLOR_RED); SetPlayerSkin(randomplayer, 264); SetPlayerHealth(randomplayer, 100); SetPlayerArmour(randomplayer, 100.0); GivePlayerWeapon(randomplayer,1 ,1); GivePlayerWeapon(randomplayer,9, 1); GivePlayerWeapon(randomplayer,44,1); TogglePlayerControllable(randomplayer,1); GameTextForPlayer(randomplayer, "~r~Infect all the humans!", 300, 0); SendClientMessage(randomplayer, COLOR_AQUA, "You've been chosen to be the starting zombie(Boss Zombie)"); KillTimer(Infect); } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 1679.0748,1447.8893,47.7780); SetPlayerCameraPos(playerid, 1679.0748,1447.8893,47.7780); SetPlayerCameraLookAt(playerid, 1679.0748,1447.8893,47.7780); SetPlayerTeam(playerid, 3); AllowPlayerTeleport(playerid, 0); return 1; }