14.09.2013, 09:44
CMD:abrirporta(playerid,params[])
{
for(new i = 0; i < MAX_CASAS;i++)
{
if(!IsPlayerInRangeOfPoint(playerid,8.0,CInfo[i][entradax],CInfo[i][entraday],CInfo[i][entradaz])) return SendClientMessage(playerid,-1,"estas lonje de casas para abrir.");
if ( CInfo[i][estadocasa] == 1)
{
CInfo[i][estadocasa] = 0;
SendClientMessage(playerid,-1,"fexaste casa.");
return 1;
}
if (CInfo[i][estadocasa] == 0)
{
CInfo[i][estadocasa] = 1;
SendClientMessage(playerid,-1,"abriste casa.");
return 1;
}
}
return 1;
}
i create a this command to make open and close my house but it just work with house id 0 and i cannot open the others. can you explain me why and how can i fix this issue? thanks i am not seeing the problem here
{
for(new i = 0; i < MAX_CASAS;i++)
{
if(!IsPlayerInRangeOfPoint(playerid,8.0,CInfo[i][entradax],CInfo[i][entraday],CInfo[i][entradaz])) return SendClientMessage(playerid,-1,"estas lonje de casas para abrir.");
if ( CInfo[i][estadocasa] == 1)
{
CInfo[i][estadocasa] = 0;
SendClientMessage(playerid,-1,"fexaste casa.");
return 1;
}
if (CInfo[i][estadocasa] == 0)
{
CInfo[i][estadocasa] = 1;
SendClientMessage(playerid,-1,"abriste casa.");
return 1;
}
}
return 1;
}
i create a this command to make open and close my house but it just work with house id 0 and i cannot open the others. can you explain me why and how can i fix this issue? thanks i am not seeing the problem here