22.06.2011, 20:51
Hola a toda la comunidad, les escribo por el siguiente problema, estoy reciйn comenzando con todo este tema de los gm y la ediciуn y se me ha hecho bastante complicado , me surgiу este problema de aparcado de coche y otra duda
*cuando voy al concesionario a comprar un coche, me subo a un auto para ver el valor, me informa como corresponde, pero la segunda vez que me subo al coche ya no me sale la informaciуn de la venta de coche.
* lo segundo , cuando compro un auto, pongo /v park, y se desaparece.
ahн esta todo, bueno si me pudieran ayudar estarнa muy agradecido.
else if(strcmp(x_nr,"park",true) == 0)
{
new Float,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
//else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; }
//else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { carid = PlayerInfo[playerid][pPcarkey3]; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
{
if(PlayerInfo[playerid][pPcarkey] == 999/* && PlayerInfo[playerid][pPcarkey2] == 999*/)// & PlayerInfo[playerid][pPcarkey3])
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");
return 1;
}
if(getcarid == carid)
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "~n~ Has Parkeado tu vehiculo en esta ubicacion. ~n~");
GameTextForPlayer(playerid, "si tu auto explota o el server se reinicia, aqui aparecera.", 10000, 3);
OnPropUpdate();
OnPlayerUpdate(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
/*else if(strcmp(x_nr,"park",true) == 0)
{
new Float,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
{
if(PlayerInfo[playerid][pPcarkey] == 999)
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");
return 1;
}
if(getcarid == carid)
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "~n~ Has estacionadado tu vehiculo en esta posicion. ~n~");
GameTextForPlayer(playerid, "Si el servidor se reinicia o el auto explota, Deberas buscarlo en el ultimo lugar que lo aparkaste.", 10000, 3);
OnPropUpdate();
OnPlayerUpdate(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cLlanta],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
AddVehicleComponent(CarInfo[carid][cLlanta]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}*/
*cuando voy al concesionario a comprar un coche, me subo a un auto para ver el valor, me informa como corresponde, pero la segunda vez que me subo al coche ya no me sale la informaciуn de la venta de coche.
* lo segundo , cuando compro un auto, pongo /v park, y se desaparece.
ahн esta todo, bueno si me pudieran ayudar estarнa muy agradecido.
else if(strcmp(x_nr,"park",true) == 0)
{
new Float,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
//else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; }
//else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { carid = PlayerInfo[playerid][pPcarkey3]; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
{
if(PlayerInfo[playerid][pPcarkey] == 999/* && PlayerInfo[playerid][pPcarkey2] == 999*/)// & PlayerInfo[playerid][pPcarkey3])
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");
return 1;
}
if(getcarid == carid)
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "~n~ Has Parkeado tu vehiculo en esta ubicacion. ~n~");
GameTextForPlayer(playerid, "si tu auto explota o el server se reinicia, aqui aparecera.", 10000, 3);
OnPropUpdate();
OnPlayerUpdate(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
/*else if(strcmp(x_nr,"park",true) == 0)
{
new Float,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
{
if(PlayerInfo[playerid][pPcarkey] == 999)
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");
return 1;
}
if(getcarid == carid)
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "~n~ Has estacionadado tu vehiculo en esta posicion. ~n~");
GameTextForPlayer(playerid, "Si el servidor se reinicia o el auto explota, Deberas buscarlo en el ultimo lugar que lo aparkaste.", 10000, 3);
OnPropUpdate();
OnPlayerUpdate(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cLlanta],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
AddVehicleComponent(CarInfo[carid][cLlanta]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}*/