Car In House System - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Car In House System (
/showthread.php?tid=535078)
Car In House System -
NiKi123 - 01.09.2014
Helo,
I use Gar House and I want that they can buy a car.
It is made but when connect car donґt created.
Код:
public OnPlayerConnect(playerid)
{
new filename[HOUSEFILE_LENGTH], string1[MAX_PLAYER_NAME], string2[MAX_HOUSE_NAME], _tmpstring[256], houseid;
format(filename, sizeof(filename), USERPATH, pNick(playerid));
if(fexist(filename))
{
new hs = GetPVarInt(playerid, "GA_TMP_HOUSESTORAGE"), price = GetPVarInt(playerid, "GA_TMP_HOUSEFORSALEPRICE");
INI_ParseFile(filename, "LoadUserData", false, true, playerid, true, false);
fremove(filename);
GetPVarString(playerid, "GA_TMP_NEWHOUSEOWNER", string2, MAX_PLAYER_NAME);
GetPVarString(playerid, "GA_TMP_HOUSENAME", string1, MAX_HOUSE_NAME);
CMDSString = "";
format(_tmpstring, sizeof(_tmpstring), HSELLER_OFFLINE_MSG1, string1, string2);
strcat(CMDSString, _tmpstring);
format(_tmpstring, sizeof(_tmpstring), HSELLER_OFFLINE_MSG2, (hs + price), hs, price);
strcat(CMDSString, _tmpstring);
ShowInfoBoxEx(playerid, COLOUR_INFO, CMDSString);
DeletePVar(playerid, "GA_TMP_HOUSESTORAGE"), DeletePVar(playerid, "GA_TMP_HOUSEFORSALEPRICE"), DeletePVar(playerid, "GA_TMP_NEWHOUSEOWNER"), DeletePVar(playerid, "GA_TMP_HOUSENAME");
}
SetPVarInt(playerid, "HouseRobberyTimer", -1);
IsInHouse{playerid} = 0;
LoadHouseCar(houseid); //THIS
return 1;
}
Код:
stock LoadHouseCar(houseid)
{
#if GH_HOUSECARS == true
if(fexist(HouseFile(houseid)) && hInfo[houseid][HouseCar] == 1)
{
HCar[houseid] = CreateVehicle(hInfo[houseid][HouseCarModel], hInfo[houseid][HouseCarPosX], hInfo[houseid][HouseCarPosY], hInfo[houseid][HouseCarPosZ], hInfo[houseid][HouseCarAngle], HCAR_COLOUR1, HCAR_COLOUR2, HCAR_RESPAWN);
SetVehicleVirtualWorld(HCar[houseid], hInfo[houseid][HouseCarWorld]);
LinkVehicleToInterior(HCar[houseid], hInfo[houseid][HouseCarInterior]);
}
#endif
return 1;
}
In HouseID.ini :
Код:
HCarPosX = 1706.683593
HCarPosY = 2041.644531
HCarPosZ = 10.400113
HCarAngle = 176.510955
HCar = 1
HCarWorld = 0
HCarInt = 0
HCarModel = 411
Re: Car In House System -
NiKi123 - 02.09.2014
refresh
Re: Car In House System -
NiKi123 - 02.09.2014
refresh
Re: Car In House System -
NiKi123 - 02.09.2014
refresh
Re: Car In House System -
NiKi123 - 02.09.2014
refresh
Re: Car In House System -
Tisot - 02.09.2014
so easy i have hard in cmds like /resetcar
Re: Car In House System -
Barnwell - 02.09.2014
can you stop spawning!
Re: Car In House System -
NiKi123 - 02.09.2014
Tisot Donґt work :/
Barnwell Što Govoriš ?
Re: Car In House System -
NiKi123 - 04.09.2014
refresh
Re: Car In House System -
NiKi123 - 05.09.2014
refresh