17.10.2015, 15:07
PHP код:
public OnPlayerEnterDynamicCP(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
for(new i = 0; i <= MAX_INTERIORS; i++)
{
if(checkpointid == InteriorCP[i])
{
// CODES
}
}
for(new i = 0; i <= MAX_INTERIORCPS; i++)
{
if(checkpointid == InteriorListCP[i])
{
// CODES
}
}
}
return 1;
}
PHP код:
public OnPlayerEnterDynamicCP(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
for(new i = 0; i <= MAX_INTERIORCPS; i++)
{
if(checkpointid == InteriorListCP[i])
{
//CODES
}
}
for(new i = 0; i <= MAX_INTERIORS; i++)
{
if(checkpointid == InteriorCP[i])
{
// CODES
}
}
}
return 1;
}
SECOND CODE: if you switch loops which making the MAX_INTERIORCPS in the first, it will work but it will effect in the second loop which is (MAX_INTERIORS) now and make it not work.
One loop just works based on which one is in the beginning...
Is it the method of looping wrong or something else? It's really Confusing !!

