19.08.2011, 00:55
Ps Haber Amigos lo que pasa es que yo aplico este comando estoy en la posicion de IsAtDealership y hago el comando y sale que no existe, pero si me voy a otro lugar lejos del IsAtDealership, me sale el mensaje q no esta en el concesionario, ps hay esta bien pero creo que es algo de la disolucion del comando que como q haga q me salga q el comando no existe y ya estoy extrezado
Gracias por su atencion
pawn Код:
if(strcmp(cmd, "/venderveh", true) == 0)
{
new vehid;
if(!IsAtDealership(playerid))
{
if(EsVehiculoDePropiedad(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh1]) { vehid = JugadorStats[playerid][uLlaveVeh1]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh2]) { vehid = JugadorStats[playerid][uLlaveVeh2]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh3]) { vehid = JugadorStats[playerid][uLlaveVeh3]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh4]) { vehid = JugadorStats[playerid][uLlaveVeh4]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh5]) { vehid = JugadorStats[playerid][uLlaveVeh5]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh6]) { vehid = JugadorStats[playerid][uLlaveVeh6]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh7]) { vehid = JugadorStats[playerid][uLlaveVeh7]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh8]) { vehid = JugadorStats[playerid][uLlaveVeh8]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh9]) { vehid = JugadorStats[playerid][uLlaveVeh9]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh10]) { vehid = JugadorStats[playerid][uLlaveVeh10]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh11]) { vehid = JugadorStats[playerid][uLlaveVeh11]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh12]) { vehid = JugadorStats[playerid][uLlaveVeh12]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh13]) { vehid = JugadorStats[playerid][uLlaveVeh13]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh14]) { vehid = JugadorStats[playerid][uLlaveVeh14]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh15]) { vehid = JugadorStats[playerid][uLlaveVeh15]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh16]) { vehid = JugadorStats[playerid][uLlaveVeh16]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh17]) { vehid = JugadorStats[playerid][uLlaveVeh17]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh18]) { vehid = JugadorStats[playerid][uLlaveVeh18]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh19]) { vehid = JugadorStats[playerid][uLlaveVeh19]; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh20]) { vehid = JugadorStats[playerid][uLlaveVeh20]; }
else { return 1; }
if(strcmp(sendername, VehiculoInformacion[vehid][uDueno], true) == 0)
{
if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh1]) { JugadorStats[playerid][uLlaveVeh1] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh2]) { JugadorStats[playerid][uLlaveVeh2] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh3]) { JugadorStats[playerid][uLlaveVeh3] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh4]) { JugadorStats[playerid][uLlaveVeh4] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh5]) { JugadorStats[playerid][uLlaveVeh5] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh6]) { JugadorStats[playerid][uLlaveVeh6] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh7]) { JugadorStats[playerid][uLlaveVeh7] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh8]) { JugadorStats[playerid][uLlaveVeh8] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh9]) { JugadorStats[playerid][uLlaveVeh9] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh10]) { JugadorStats[playerid][uLlaveVeh10] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh11]) { JugadorStats[playerid][uLlaveVeh11] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh12]) { JugadorStats[playerid][uLlaveVeh12] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh13]) { JugadorStats[playerid][uLlaveVeh13] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh14]) { JugadorStats[playerid][uLlaveVeh14] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh15]) { JugadorStats[playerid][uLlaveVeh15] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh16]) { JugadorStats[playerid][uLlaveVeh16] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh17]) { JugadorStats[playerid][uLlaveVeh17] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh18]) { JugadorStats[playerid][uLlaveVeh18] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh19]) { JugadorStats[playerid][uLlaveVeh19] = 1999; }
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh20]) { JugadorStats[playerid][uLlaveVeh20] = 1999; }
TogglePlayerControllable(playerid, 1);
VehiculoInformacion[vehid][uModelo] = 0;
VehiculoInformacion[vehid][uIDueno] = 0;
VehiculoInformacion[vehid][uDueno] = 0;
VehiculoInformacion[vehid][uSpawnx] = 0;
VehiculoInformacion[vehid][uSpawny] = 0;
VehiculoInformacion[vehid][uSpawnz] = 0;
VehiculoInformacion[vehid][uAngulo] = 0;
VehiculoInformacion[vehid][uColorUno] = 0;
VehiculoInformacion[vehid][uColorDos] = 0;
VehiculoInformacion[vehid][uValor] = 0;
VehiculoInformacion[vehid][uCerrado] = 0;
VehiculoInformacion[vehid][uLicencia] = 0;
GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~w~Vendiste tu auto", 3500, 3);
DestroyVehicle(vehid);
OnPropUpdate();
OnPlayerUpdate(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Necesitas traer el coche para venderlo! ");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "No estas en un concesionario");
return 1;
}
}
}
public EsVehiculoDePropiedad(playerid)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh1] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh2] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh3] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh4])
{
}
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh5] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh6] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh7] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh8])
{
}
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh9] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh10] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh11] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh12])
{
}
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh13] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh14] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh15] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh16])
{
}
else if(GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh17] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh18] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh19] || GetPlayerVehicleID(playerid) == JugadorStats[playerid][uLlaveVeh20])
{
}
}
return 0;
}
public IsAtDealership(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(30, playerid,935.3022,-3734.1057,13.3507))//Colombia City
{
return 1;
}
if(PlayerToPoint(30, playerid,935.3022,-3734.1057,13.3507))//Colombia City
{
return 1;
}
}
return 0;
}