When Player Registers he crashs
#1

When player try to register his game just crash

Code
PHP код:
    if(PlayerInfo[playerid][pTut] == 0)
        {
            
gOoc[playerid] = 1gNews[playerid] = 1gFam[playerid] = 1;
            
TogglePlayerControllable(playerid,0);
            
SetPlayerColor(playerid,TEAM_HIT_COLOR);
            
SetPlayerPos(playerid,-1876.3914,49.9433,1055.1891);
            
SetPlayerInterior(playerid14);
            
//SetPlayerCameraPos(playerid, 751.93, -1673.95, 16.01);
               //SetPlayerCameraLookAt(playerid, 699.55, -1628.93, 5.88);
               
RegistrationStep[playerid] = 1;
               
SendClientMessageEx(playeridCOLOR_PURPLE"** You enter the immigration office **");
            
SendClientMessageEx(playeridCOLOR_WHITE"[IMMIGRATION] Welcome to Los Santos. I will ask you a few questions before you are allowed entrance.");
            
SendClientMessageEx(playeridCOLOR_WHITE"[IMMIGRATION] Are you a Male or Female?");
            return 
1;
        } 
Reply
#2

Okay listen waleed,

Where is the location of your imigration? Check if there are alot of cars, Decrease it.
Reply
#3

It's a interior in skies, there are not a lot of cars.

And second bug is that my game crashes when i went to Blueberry coords 0;0
Reply
#4

Only your game crashes?
Reply
#5

If i set this code

PHP код:
        if(PlayerInfo[playerid][pTut] == 0)
        {
            
gOoc[playerid] = 1gNews[playerid] = 1gFam[playerid] = 1;
            
TogglePlayerControllable(playerid,0);
            
SetPlayerColor(playerid,TEAM_HIT_COLOR);
            
SetPlayerPos(playerid,1830.803,-1731.561,5203.459);
            
//SetPlayerCameraPos(playerid, 751.93, -1673.95, 16.01);
               //SetPlayerCameraLookAt(playerid, 699.55, -1628.93, 5.88);
               
RegistrationStep[playerid] = 1;
               
SendClientMessageEx(playeridCOLOR_PURPLE"** You enter the immigration office **");
            
SendClientMessageEx(playeridCOLOR_WHITE"[IMMIGRATION] Welcome to Los Santos. I will ask you a few questions before you are allowed entrance.");
            
SendClientMessageEx(playeridCOLOR_WHITE"[IMMIGRATION] Are you a Male or Female?");
            
SetPlayerVirtualWorld(playerid0);
            return 
1;
        } 
All is working.
Reply
#6

Possibly 14th interior is crashing the game.
Reply
#7

No it isnt, because i have like
PHP код:
  if(dialogid == DIALOG_SPAWN)
    {
        if(
response || !response)
        {
            
            for(new 
x;x<10000;x++)
                        {
                            new 
rand=random(300);
                            if(
PlayerInfo[playerid][pSex] == 0)
                            {
                                if(
IsValidSkin(rand))
                                {
                                    
PlayerInfo[playerid][pModel] = rand;
                                    
SetPlayerSkin(playeridrand);
                                    break;
                                }
                            }
                            else
                            {
                                if(
IsFemaleSkin(rand))
                                {
                                    
PlayerInfo[playerid][pModel] = rand;
                                    
SetPlayerSkin(playeridrand);
                                    break;
                                }
                            }
                        }
                        
SetPlayerPos(playerid, -1876.3914,49.9433,1057.1891);
                        
SetPlayerInterior(playerid,14);
                        
PlayerInfo[playerid][pTut] = 1;
                        
gOoc[playerid] = 0gNews[playerid] = 0gFam[playerid] = 0;
                        
TogglePlayerControllable(playerid1);
                        
//SetCamBack(playerid);
                        
DeletePVar(playerid"MedicBill");
                        
SetPlayerColor(playerid,TEAM_HIT_COLOR);
                        
SetCameraBehindPlayer(playerid);
                        
PlayerInfo[playerid][pCarLic] = 0;
                        }
        } 
And it sets player position there without crashing after registration
Reply
#8

Then change the spawn point.
Reply
#9

But why it's not crashing when player spawns but it is crashing when you register?
Reply
#10

Fixed
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)