[Ayuda] Stay within the world boundries -
AaronX - 27.08.2016
Hola a todos, tengo un problema al salir del garaje de las casas, me lleva como a otro mundo:
їQue podrб ser?
Este es el comando que utilizo para entrar al garaje:
Код:
CMD:salir(playerid, params[])
{
if(Entrando[playerid] == 0)
{
Entrando[playerid] = 1;
SetTimerEx("Entrandos",3000,false,"d",playerid);
}
if(IsPlayerConnected(playerid))
if(PlayerInfo[playerid][EnGarage] > 0) // Salida de garajes
{
for(new i=0;i<MAX_CASAS;i++)
{
if(CasasInfo[i][hID2] == PlayerInfo[playerid][EnGarage])
{
if(CasasInfo[i][hcomprable] == 1) return 1;
}
if(CasasInfo[i][hID2] == PlayerInfo[playerid][EnGarage])
{
new vid = GetPlayerVehicleID(playerid);
if(vid != autos[playerid] && vid != autos2[playerid] && vid != autos3[playerid] && vid != autos4[playerid]) return SCM(playerid,-1,"Solo puedes sacar tus vehiculos del garaje.");
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,"Debes estar en un vehiculo para salir del garaje.");
if(vid == autos[playerid])
{
SetVehiclePos(vid, CasasInfo[i][gsx],CasasInfo[i][gsy],CasasInfo[i][gsz]);
SetVehiclePassengersInteriorEx(vid, 0);
SetVehiclePassengersVWEx(vid, 0);
PlayerInfo[playerid][vinterior] = 0;
PlayerInfo[playerid][vvw] = 0;
PlayerInfo[playerid][EnGarage] = 0;
SetVehicleZAngle(vid, CasasInfo[i][gsa]);
}
else if(vid == autos2[playerid])
{
SetVehiclePos(vid, CasasInfo[i][gsx],CasasInfo[i][gsy],CasasInfo[i][gsz]);
SetVehiclePassengersInteriorEx(vid, 0);
SetVehiclePassengersVWEx(vid, 0);
PlayerInfo[playerid][v2interior] = 0;
PlayerInfo[playerid][v2vw] = 0;
PlayerInfo[playerid][EnGarage] = 0;
SetVehicleZAngle(vid, CasasInfo[i][gsa]);
}
else if(vid == autos3[playerid])
{
SetVehiclePos(vid, CasasInfo[i][gx] ,CasasInfo[i][gy] ,CasasInfo[i][gz] );
SetVehiclePassengersInteriorEx(vid, 0);
SetVehiclePassengersVWEx(vid, 0);
PlayerInfo[playerid][v3interior] = 0;
PlayerInfo[playerid][v3vw] = 0;
PlayerInfo[playerid][EnGarage] = 0;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,CasasInfo[i][gx] ,CasasInfo[i][gy] ,CasasInfo[i][gz] );
SetVehicleZAngle(vid, CasasInfo[i][gsa]);
}
else if(vid == autos4[playerid])
{
SetVehiclePos(vid, CasasInfo[i][gx] ,CasasInfo[i][gy] ,CasasInfo[i][gz] );
SetVehiclePassengersInteriorEx(vid, 0);
SetVehiclePassengersVWEx(vid, 0);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,CasasInfo[i][gx] ,CasasInfo[i][gy] ,CasasInfo[i][gz] );
PlayerInfo[playerid][v4interior] = 0;
PlayerInfo[playerid][v4vw] = 0;
PlayerInfo[playerid][EnGarage] = 0;
SetVehicleZAngle(vid, CasasInfo[i][gsa]);
}
return 1;
}
}
}
Respuesta: [Ayuda] Stay within the world boundries -
Zume - 27.08.2016
Eso pasa porque no tienes bien las coordenadas, se salen del mapa del GTA SA.
Intenta usar esto:
pawn Код:
public OnPlayerUpdate( playerid )
{
static
Float: X, Float: Y, Float: Z
;
GetPlayerPos( playerid, X, Y, Z );
if( X >= 99999.0 || Y >= 99999.0 || Z >= 99999.0 || X <= -99999.0 || Y <= -99999.0 || Z <= -99999.0 ) {
SendClientMessage( playerid, 0xa9c4e4ff, "Warning: Estas fuera del mapa!!");
}
return 1;
}
si te sale es por serб por eso.
Respuesta: [Ayuda] Stay within the world boundries -
AaronX - 28.08.2016
Si coloco eso que me dices el pawno me da error al compilar
Respuesta: [Ayuda] Stay within the world boundries -
OTACON - 28.08.2016