15.12.2012, 11:53
Hello there guys i'm developing a Roleplay GM from scratch for my server, but i have trouble with one of my functions i made rescently:
When i place it at: OnPlayerConnect i place it so it's the last so it can get the Tester/Admin rank from the user files and kick the player if it's not admin... but when i login without tester/admin rank it's just connecting me successfuly and than says: "The server is restarting" with no message.. i tryed putting it at OnPlayerSpawn but then i think it passes the whole function because i can do anything in-game...
pawn Код:
//=================================DEVEOPING MODE==============================================
/*
Comment out the lines below if you want normal players to connect
Normal players = not admins, not testers, not mods, just normal players xD
*/
if(PlayerInfo[playerid][pTester] == 0 || PlayerInfo[playerid][pAdmin] < 1){
SCM(playerid, COLOR_LIGHTRED, "Server is in Developing mode, only admins/testers can connect.");
SCM(playerid, COLOR_LIGHTRED, "If you wanna become a tester contact the owner via skype:");
SCM(playerid, COLOR_LIGHTRED, "cnk-midle");
Kick(playerid);
} else {
SCM(playerid, COLOR_LIGHTRED, "You connected because you are a tester, the server is in test mode.");
SCM(playerid, COLOR_LIGHTRED, "Players that don't have the tester or admin rank are gonna be kicked.");
}