Keep crashing
#1

Hey guys can someone please help me with this problem.I download a fcrp game mode i fixed every error and got the script to work,but when i am a normal player it wont kick me as soon as i make my self admin in scriptfiles it keeps on kicking me.Can someone please help me figure out whats wrong.Thanks

Reply
#2

Look for OnPlayerSpawn and look for anything related to logging in as an administrator.
Reply
#3

Then what?
Reply
#4

Quote:
Originally Posted by Akira297
Посмотреть сообщение
Look for OnPlayerSpawn and look for anything related to logging in as an administrator.
public OnPlayerSpawn(playerid)
{
// Anti F4 Bug - Logging/Registering
if(!PlayerInfo[playerid][pLoggedIn] && !IsPlayerNPC(playerid))
{
if(IsPlayerNPC(playerid)) return 1;
SetPlayerPos(playerid, 1975.203002, 3779.311523, -50.243506);
SetPlayerCameraPos(playerid, 1975.203002, 3779.311523, 100.243506);
SetPlayerCameraLookAt(playerid, 1975.203002, 3779.311523, -0.243506);
SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
new file[64];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
// Player isn't banned
if(dini_Int(file, "AdminAccount") == 1)
{
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
SetPlayerName(playerid, dini_Get(file, "OldName"));
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
ShowDialog(playerid, 2);
}
if(!dini_Exists(file))
{
ShowDialog(playerid, 1);
return 1;
}
else
{
ShowDialog(playerid, 2);
}
return 1;
}
// Actual Spawning
ResetPlayerWeapons(playerid);
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "BusDriver", true)) //Checking if the NPC's name is BusDriver
{
PutPlayerInVehicle(playerid, NPCBus, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}
return 1;
}
if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
{
FalseBan[playerid] = 0;
SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
SpawnChar(playerid);
}
return 1;
}
Reply
#5

- When you log onto the administration does a dialog box appear for you to enter text or click on something?

Код:
if(dini_Int(file, "AdminAccount") == 1)
{
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
SetPlayerName(playerid, dini_Get(file, "OldName"));
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
ShowDialog(playerid, 2);
}
if(!dini_Exists(file))
{
ShowDialog(playerid, 1);
return 1;
}
Reply
#6

no dialog pops up it just says i am logged in as a admin then it kicks me.
Reply
#7

Quote:
Originally Posted by Drake Star
Посмотреть сообщение
no dialog pops up it just says i am logged in as a admin then it kicks me.
- Then you need to look at the dialog boxes within the game-mode. Dialog ID 2 and ID 1.
Reply
#8

What do you mean,I am very confused i am not that much of a script,I dont know how to fix this
Reply
#9

- There should be a dialog being displayed when you spawn as an administrator. Within the dialog is where it's kicking you.
Reply
#10

Well no dialog is popping up at all,And how can i fix it so it does not keep kicking me,When i remove my admin it lets me join the server when i give my self admin it kicks me auto when i join.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)