PDA

View Full Version : Creating a new dealership


Chris iceman
20/06/2012, 10:05 AM
hey guys i have a current car dealership that replaces a house car in from of the players house i wanna make it so when they buy the car it pops up at the dealership and they have to park there car i was wondering if any can help with a tutorial or if someone has a filterscript that does this.

Unfriendly
20/06/2012, 10:08 AM
Could you post the code you're using here please?

Chris iceman
21/06/2012, 09:38 AM
what part of the code do you need me to post the purchase command

Chris iceman
21/06/2012, 09:52 AM
this is the purchase command for the car lot

dcmd_purchase(playerid,params[])
{
if(!strlen(params))
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid >= 36 && vehicleid <= 100)
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new str1[256],pname[24],houseid;
GetPlayerName(playerid, pname, 24);
format(str1, sizeof(str1), "Houses/Users/%s", udb_encode(pname));
houseid = dini_Int(str1, "Houseid");
if(houseid!=-255)
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Sorry shopper, your level is too low. You must be level 3 or higher to purchase a car from us.");
return 1;
}
else
{
//vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]
if((vehicleid >= 72 && vehicleid <= 99) && GetPlayerMoney(playerid) >= 600000 && PlayerInfo[playerid][pLevel] >= 25)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -600000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;

}
else if(GetPlayerMoney(playerid) >= 150000 && PlayerInfo[playerid][pLevel] >= 200 && vehicleid == 100)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -150000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 21000 && PlayerInfo[playerid][pLevel] >= 4 && vehicleid == 36)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -21000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 10000 && PlayerInfo[playerid][pLevel] >= 2 && vehicleid == 37)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -10000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 25000 && PlayerInfo[playerid][pLevel] >= 4 && vehicleid == 38)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

F_GivePlayerMoney(playerid, -25000);

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 24000 && PlayerInfo[playerid][pLevel] >= 8 && vehicleid == 39)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -24000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 40000 && PlayerInfo[playerid][pLevel] >= 12 && vehicleid == 40)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -40000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 20000 && PlayerInfo[playerid][pLevel] >= 4 && vehicleid == 42)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -20000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 39000 && PlayerInfo[playerid][pLevel] >= 10 && vehicleid == 43)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -39000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 23000 && PlayerInfo[playerid][pLevel] >= 8 && vehicleid == 44)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -23000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 35000 && PlayerInfo[playerid][pLevel] >= 9&& vehicleid == 45)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -35000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 20000 && PlayerInfo[playerid][pLevel] >= 4 && vehicleid == 46)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -20000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 10000 && PlayerInfo[playerid][pLevel] >= 2 && vehicleid == 47)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -10000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 27000 && PlayerInfo[playerid][pLevel] >= 8 && vehicleid == 48)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -27000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 5000 && PlayerInfo[playerid][pLevel] >= 1 && vehicleid == 49)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -5000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 22000 && PlayerInfo[playerid][pLevel] >= 2 && vehicleid == 50)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -22000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 10000 && PlayerInfo[playerid][pLevel] >= 3 && vehicleid == 51)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -10000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 15000 && PlayerInfo[playerid][pLevel] >= 3 && vehicleid == 52)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -15000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 100000 && PlayerInfo[playerid][pLevel] >= 30 && vehicleid == 53)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -100000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 70000 && PlayerInfo[playerid][pLevel] >= 25 && vehicleid == 54)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -70000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 16000 && PlayerInfo[playerid][pLevel] >= 3 && vehicleid == 55)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -16000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 35000 && PlayerInfo[playerid][pLevel] >= 9 && vehicleid == 56)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -35000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 60000 && PlayerInfo[playerid][pLevel] >= 20 && vehicleid == 41)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -60000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 23000 && PlayerInfo[playerid][pLevel] >= 5 && vehicleid == 58)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -23000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 45000 && PlayerInfo[playerid][pLevel] >= 6 && vehicleid == 59)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -45000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 60000 && PlayerInfo[playerid][pLevel] >= 5 && vehicleid == 60)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -60000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 80000 && PlayerInfo[playerid][pLevel] >= 8 && vehicleid == 61)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -80000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 90000 && PlayerInfo[playerid][pLevel] >= 10 && vehicleid == 62)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -90000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 75000 && PlayerInfo[playerid][pLevel] >= 12 && vehicleid == 63)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -75000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 60000 && PlayerInfo[playerid][pLevel] >= 12 && vehicleid == 64)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -60000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 90000 && PlayerInfo[playerid][pLevel] >= 5 && vehicleid == 65)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -90000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 10000 && PlayerInfo[playerid][pLevel] >= 8 && vehicleid == 66)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -10000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 70000 && PlayerInfo[playerid][pLevel] >= 5 && vehicleid == 67)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -70000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 30000 && PlayerInfo[playerid][pLevel] >= 8 && vehicleid == 68)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -30000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 36000 && PlayerInfo[playerid][pLevel] >= 20 && vehicleid == 69)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -36000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 28000 && PlayerInfo[playerid][pLevel] >= 17 && vehicleid == 70)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -28000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}
else if(GetPlayerMoney(playerid) >= 50000 && PlayerInfo[playerid][pLevel] >= 10 && vehicleid == 71)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
dini_IntSet(house, "CarModel", GetVehicleModel(GetPlayerVehicleID(playerid)));
F_GivePlayerMoney(playerid, -50000);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot, zHouseCar;
zHouseCar = cInfo[houseid][CarID];
SetVehicleToRespawn(zHouseCar);
GetVehiclePos(zHouseCar, vehx, vehy, vehz);
GetVehicleZAngle(zHouseCar, z_rot);
DestroyVehicle(zHouseCar);
zHouseCar = CreateVehicle(dini_Int(house, "CarModel"),vehx,vehy,vehz,z_rot,0,0,7200); // buffalo_kelhouse

SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Thank you shopper, you have purchased this vehicle for your home!");
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) You vehicle will be delivered to your home ASAP.");
return 1;
}else{
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Sorry shopper, your level is too low or you don't have the money to purchase a car from us.");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_TAI, "(CARLOT) Sorry shopper, you do not own a house. You must own a house to purchase a car from us.");
return 1;
}
}
return 1;
}
return 1;
}
return 1;
}

this is the command to park car the players car

dcmd_parkcar(playerid,params[])
{
#pragma unused params
new str1[256],houseid;
format(str1, sizeof(str1), "Houses/Users/%s", udb_encode(ReturnPlayerName(playerid)));
houseid = dini_Int(str1, "Houseid");

new PlayerVehicle;
if(GetPlayerState(playerid) == 1 || !IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, red, "{ff0000}[Error:] {dfebff} You cannot park a vehicle without being in one first!");
return 1;
}
if(houseid!=-255)
{
}
else
{
SendClientMessage(playerid, red, "{ff0000}[Error:] {dfebff} You must own a house first, before you can park a car for it!");
return 1;
}
new housecar;
PlayerVehicle = GetPlayerVehicleID(playerid);
housecar = eVehInfo[PlayerVehicle][HID];

if(housecar != houseid)
{
SendClientMessage(playerid, red, "{ff0000}[Error:] {dfebff} You must be in your own house car to park it!");
return 1;
}

if(PlayerVehicle >= house0 && PlayerVehicle <= house194)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);

new Float:vehx, Float:vehy, Float:vehz, Float:z_rot;
GetVehiclePos(GetPlayerVehicleID(playerid), Float:vehx, Float:vehy, Float:vehz);
GetVehicleZAngle(GetPlayerVehicleID(playerid), z_rot);

dini_FloatSet(house, "CarX", vehx);
dini_FloatSet(house, "CarY", vehy);
dini_FloatSet(house, "CarZ", vehz);
dini_FloatSet(house, "CarA", z_rot);


SendClientMessage(playerid, COLOR_TAI, "{5c99ff}[Server:] {dfebff} You have successfully parked your vehicle. It will respawn here after the next server restart.");
return 1;
}
return 1;
}

Unfriendly
21/06/2012, 11:36 AM
Okay I don't have the time right now to script this. I have to go to bed cause I work thirds tonight.

But here's your situation.
The cars you own in your script are housecars.

You need to make a new enum called zveh, or whatver you want to name it.
And then set it up so that instead of it saving as a zhousecar it saves as a zveh

Then setup zveh to just spawn the car at whatever coordinates you wish, then allow them to /park it.

If you don't know how to do all this, or if it doesn't make sense to you at all, I can do it for you.
But not right now.

Chris iceman
21/06/2012, 12:01 PM
alright i will try doing it step by step have a good evening