Run time error 4: "Array index out of bounds (more then 6/7:C)
#8

PHP код:
public OnPlayerEnterCheckpoint(playerid
{
    if(
playerid != INVALID_PLAYER_ID)
    {
        new 
text[128]; 
        if(
IsCapturing[playerid][usapro] == 1
        {
            if(
IsPlayerInVehicle(playeridusapro)) 
            {
                
DisablePlayerCheckpoint(playerid); 
                
IsCapturing[playerid][usapro] = 0
                
format(textsizeof(text), "~r~%s~w~ has Captured ~r~USA prototype ~w~for his team!"pName(playerid));
                
RemovePlayerFromVehicle(playerid); 
                
SCM(playeridC_GREEN"Congratulations! You got +6 score and +6000 cash!");
                
GivePlayerMoney(playerid6000); 
                
SetVehicleToRespawn(usapro);
                
SetPlayerScore(playeridGetPlayerScore(playerid)+6); 
                
TogglePlayerAllDynamicCPs(playerid1); 
                
TextStats(playerid);
                
Savestatus(playerid); 
            } 
            else 
            {
                
DisablePlayerCheckpoint(playerid); 
                
SCM(playeridRED"You're not in the USA Prototype."); 
            }
        }
    }
}
.... 
Would be better if you use switch statements.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)