Houses PickUp's - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Houses PickUp's (
/showthread.php?tid=217358)
Houses PickUp's - Plz Read all the posts -
Jaber_Brown - 27.01.2011
i have houses in LS , just like this pickup's
but i want to remove the pickups and add checkpoints .. i think this is the code but how ( im new in scripting )
Код:
public LoadProperty()
{
new arrCoords[32][64];
new strFromFile2[256];
new File: file = fopen("property.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(HouseInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
//printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
HouseInfo[idx][hValue] = strval(arrCoords[14]);
HouseInfo[idx][hHel] = strval(arrCoords[15]);
HouseInfo[idx][hArm] = strval(arrCoords[16]);
HouseInfo[idx][hInt] = strval(arrCoords[17]);
HouseInfo[idx][hLock] = strval(arrCoords[18]);
HouseInfo[idx][hOwned] = strval(arrCoords[19]);
HouseInfo[idx][hRooms] = strval(arrCoords[20]);
HouseInfo[idx][hRent] = strval(arrCoords[21]);
HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
HouseInfo[idx][hTakings] = strval(arrCoords[23]);
HouseInfo[idx][hVec] = strval(arrCoords[24]);
if(HouseInfo[idx][hVec] == 457)
{
HouseInfo[idx][hVec] = 411;
}
HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
HouseInfo[idx][hDate] = strval(arrCoords[27]);
HouseInfo[idx][hLevel] = strval(arrCoords[28]);
HouseInfo[idx][hWorld] = strval(arrCoords[29]);
HouseInfo[idx][hOutWorld] = strval(arrCoords[30]);
HouseInfo[idx][hOutInt] = strval(arrCoords[31]);
idx++;
}
fclose(file);
}
return 1;
btw .. i have property file in scriptfiles which includes the houses location
if it's not the right code tell me where i can find it i'll post it :d
Re: Houses PickUp's -
1337connor - 27.01.2011
That code doesn't have the CreatePickup in it...
Re: Houses PickUp's -
Jaber_Brown - 27.01.2011
so , what word i look for ?
Re: Houses PickUp's -
Jaber_Brown - 27.01.2011
I dont find CreatePickup
Re: Houses PickUp's -
Luis- - 27.01.2011
Search for AddStaticPickup..
Re: Houses PickUp's -
Jaber_Brown - 27.01.2011
I dont find it
.. Do you want to come on Team Viewer to see ?
Re: Houses PickUp's -
Jaber_Brown - 27.01.2011
i found CreateDynamicPickup , is this it ?
Re: Houses PickUp's -
xemper - 27.01.2011
Try delete the lines related to the pickup, and have a backup if u mess up, and see if that worked.
Re: Houses PickUp's -
viKKmaN - 27.01.2011
"CreatePickup("
And look at the parameters. If it uses house informations then they surelly spawn the pickups for houses.
Quote:
Originally Posted by Jaber_Brown
i found CreateDynamicPickup , is this it ?
|
Yes, that is it. Seems you are using Incognito's Streamer
Re: Houses PickUp's -
Jaber_Brown - 27.01.2011
Here is the gode guys
Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75, 25.0, 0);
HouseInfo[h][hPickupID]=CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
if(HouseInfo[h][hOwned] == 1)
{
Create3DTextLabel("[Property]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75, 25.0, 0);
HouseInfo[h][hPickupID]=CreateDynamicPickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
}
what should i do to make them chekpoints , and btw i tried to put // to disable'em and it worked , the pickup's disappeared