Re: YSF - kurta999's version -
IllidanS4 - 18.05.2015
SetPlayerWeather doens't update the weather with the latest release.
Re: YSF - kurta999's version -
MehranGta - 19.05.2015
Quote:
Originally Posted by sprtik
Thanks for the update, but again no players are shown in the client, and setnick sometimes doesn't update TAB list (both on Win and Linux). At least it runs on Linux now.
|
Same problem.
Re: YSF - kurta999's version -
[WSF]ThA_Devil - 19.05.2015
Kurta, will the ObjectSizes be updated for the 0.3.7 objects? It is kinda necessary for my script, or should I just create a simpler alternative?
Re: YSF - kurta999's version -
[Twixx] - 20.05.2015
Quote:
Originally Posted by [WSF]ThA_Devil
Kurta, will the ObjectSizes be updated for the 0.3.7 objects? It is kinda necessary for my script, or should I just create a simpler alternative?
|
I second this question. Answer us, oh almighty lord kurta.
Re: YSF - kurta999's version -
kurta999 - 20.05.2015
Quote:
Originally Posted by [WSF]ThA_Devil
Kurta, will the ObjectSizes be updated for the 0.3.7 objects? It is kinda necessary for my script, or should I just create a simpler alternative?
|
If you have correct object sizes then I will update plugin. But I don't know how to get sizes for new objects. I just put Y_Less include into this plugin, that's all.
Re: YSF - kurta999's version -
[WSF]ThA_Devil - 20.05.2015
Quote:
Originally Posted by kurta999
If you have correct object sizes then I will update plugin. But I don't know how to get sizes for new objects. I just put Y_Less include into this plugin, that's all.
|
Alright, thanks for the answer. I'll see if I can do anything.
Edit:
What exactly is the size radius in this case? Is it from pivot point to the longest side of the object or is it a sphere which is around object, but not centered to pivot point? If I knew that it'd be helpful.
Re: YSF - kurta999's version -
Abagail - 20.05.2015
I believe the modelsizes include just uses the data provided by rockstar, however I will see if I can get a solution to get the new sizes for the 0.3.7 objects.
Re: YSF - kurta999's version -
Crayder - 20.05.2015
Quote:
Originally Posted by Abagail
I believe the modelsizes include just uses the data provided by rockstar, however I will see if I can get a solution to get the new sizes for the 0.3.7 objects.
|
Use ColAndreas's bounding sphere function, it returns exact sizes and offsets. Plus you could always update the list when new objects are added by samp versions. I could make a script for it if you want, but I'm sure you know how simple it is.
Also, the sizes in modelsizes.inc are not from R*, Kalcor exported the sizes himself (but as we know, most of those sizes are off by a bit, some a lot).
Re: YSF - kurta999's version -
Abagail - 20.05.2015
Well, is there any chance you can provide an efficient example? I haven't had a lot of time to explore ColAndreas since I just got a new PC yesterday, and didn't have one since Thursday.
Re: YSF - kurta999's version -
[WSF]ThA_Devil - 20.05.2015
Quote:
Originally Posted by Crayder
Use ColAndreas's bounding sphere function, it returns exact sizes and offsets. Plus you could always update the list when new objects are added by samp versions. I could make a script for it if you want, but I'm sure you know how simple it is.
Also, the sizes in modelsizes.inc are not from R*, Kalcor exported the sizes himself (but as we know, most of those sizes are off by a bit, some a lot).
|
They are accurate enough for some tasks, as we sometimes only need vague sizes to accomplish the task. Also I don't want to have another plugin aside of YSF, as I have no need for everything else in ColAndreas.
Re: YSF - kurta999's version -
Abagail - 20.05.2015
I believe he is hinting that we can use it to generate the offsets for the new objects(correct me if I am wrong), and then export that data into the YSF plugin.
Re: YSF - kurta999's version -
Crayder - 20.05.2015
Quote:
Originally Posted by [WSF]ThA_Devil
They are accurate enough for some tasks, as we sometimes only need vague sizes to accomplish the task. Also I don't want to have another plugin aside of YSF, as I have no need for everything else in ColAndreas.
|
You are off of what I said by a few miles homie.
Quote:
Originally Posted by Abagail
I believe he is hinting that we can use it to generate the offsets for the new objects(correct me if I am wrong), and then export that data into the YSF plugin.
|
I'm saying we can use CA to generate an entirely new array of offsets for EVERY object. All of the sizes from modelsizes (now in YSF) are wrong, we can correct them!
Basically, we just have to export the values returned from the following function to a file containg an array identical to the one in modelsizes.inc.
Код:
CA_GetModelBoundingSphere(modelid, &Float:offx, &Float:offy, &Float:offz, &Float:radius);
This will be a fairly simple task.
Re: YSF - kurta999's version -
Abagail - 20.05.2015
I didn't know there was a plug and play method for that, that part of storing the data shouldn't be a difficult task, e.g:
pawn Код:
stock StoreAsArray(model1, model2) {
new Float: x, Float: y, Float: z, Float: radius, bufferstring[300], string[126];
for (new i = model1; i != model2; ++i)
{
CA_GetModelBoundingSphere(model1, x, y, z, radius);
format(string, sizeof string, ",%f, %f, %f", x, y, z);
strcat(bufferstring, string, sizeof(bufferstring));
}
printf(bufferstring);
new File: handle = fopen("offsets.txt");
if(handle) {
fwrite(handle, bufferstring);
fclose(handle);
}
return bufferstring;
}
Though I am still looking at how modelsizes stores the offsets.
Re: YSF - kurta999's version -
Crayder - 20.05.2015
Quote:
Originally Posted by Abagail
I didn't know there was a plug and play method for that, that part of storing the data shouldn't be a difficult task, e.g:
pawn Код:
stock StoreAsArray(model1, model2) { new Float: x, Float: y, Float: z, Float: radius, bufferstring[300], string[126]; for (new i = model1; i != model2; ++i) { CA_GetModelBoundingSphere(model1, x, y, z, radius); format(string, sizeof string, ",%f, %f, %f", x, y, z); strcat(bufferstring, string, sizeof(bufferstring)); } printf(bufferstring); new File: handle = fopen("offsets.txt"); if(handle) { fwrite(handle, bufferstring); fclose(handle); }
return bufferstring; }
Though I am still looking at how modelsizes stores the offsets.
|
I was thinking something like this:
Код:
new Line[2][512], Float:oX, Float:oY, Float:oZ, Float:R, File:Sizes = fopen("sizes.txt", io_append), File:Offsets = fopen("offsets.txt", io_append);
for(new row; row < 1000; row++)
{
Line[0][0] = EOS; Line[1][0] = EOS;
strcat(Line[0], "\t\t"); strcat(Line[1], "\t\t");
for(new col; col < 20; col++)
{
CA_GetModelBoundingSphere((row * 1000) + col, oX, oY, oZ, R);
strcat(Line[0], sprintf("%0.6f, ", R));
strcat(Line[1], sprintf("{%0.6f, %0.6f, %0.6f}, ", oX, oY, oZ));
}
strcat(Line[0], "\r\n"); strcat(Line[1], "\r\n");
fwrite(Sizes, Line[0]); fwrite(Offsets, Line[1]);
}
fclose(Sizes);
fclose(Offsets);
We can always add the following:
Код:
stock const
Float:MODELS_gColRadius[20000] =
{
//EVERYTHING from sizes.txt here.
},
Float:MODELS_gColOffset[20000][3] =
{
//EVERYTHING from offsets.txt here.
};
Re: YSF - kurta999's version -
Abagail - 20.05.2015
Yes but I don't understand how the data is actually stored, what is the starting object etc, and I think it'd be easier to just store all the variables in one LARGE string, and then print it to the file - no need to write every loop.
Re: YSF - kurta999's version -
Crayder - 20.05.2015
Quote:
Originally Posted by Abagail
Yes but I don't understand how the data is actually stored, what is the starting object etc, and I think it'd be easier to just store all the variables in one LARGE string, and then print it to the file - no need to write every loop.
|
In modelsizes every objectid possible was accounted for, when it was made that was 19904 objects starting at 0.
I'm writing every loop because modelsizes has 16 objects per line. I'm doing 20 objects (col) per line (row).
It's not like a large string is going to speed it up, it's only 1000 writes.
EDIT: Btw, in my code where I multiply by 1000, it should be by 20. XD
And the string sizes need raised, then the code works beautifully!
The new, perfect (nothings perfect, but it's close) code.
Код:
new Line[2][1536], Float:oX, Float:oY, Float:oZ, Float:R, File:Sizes = fopen("sizes.txt", io_append), File:Offsets = fopen("offsets.txt", io_append);
for(new row; row < 1000; row++)
{
Line[0][0] = EOS; Line[1][0] = EOS;
strcat(Line[0], "\t\t"); strcat(Line[1], "\t\t");
for(new col; col < 20; col++)
{
CA_GetModelBoundingSphere((row * 20) + col, oX, oY, oZ, R);
strcat(Line[0], sprintf("%0.6f, ", R));
strcat(Line[1], sprintf("{%0.6f, %0.6f, %0.6f}, ", oX, oY, oZ));
printf("[%i] R: %0.6f S: %0.6f, %0.6f, %0.6f", (row * 20) + col, oX, oY, oZ, R);
}
strcat(Line[0], "\r\n"); strcat(Line[1], "\r\n");
fwrite(Sizes, Line[0]); fwrite(Offsets, Line[1]);
}
fclose(Sizes);
fclose(Offsets);
Chris is already fixing the SA-MP object problem with CA (I stay updated with details, if anyone knows it's me). Once that's fixed we can provide a perfect version of modelsizes for YSF using the code above. But for now,
BOOM.
Re: YSF - kurta999's version -
[Twixx] - 21.05.2015
Quote:
Originally Posted by Abagail
Yes but I don't understand how the data is actually stored, what is the starting object etc, and I think it'd be easier to just store all the variables in one LARGE string, and then print it to the file - no need to write every loop.
|
I suppose we need Kurta's input on this.
Re: YSF - kurta999's version -
Crayder - 21.05.2015
Quote:
Originally Posted by [Twixx]
I suppose we need Kurta's input on this.
|
For what? This? "Yes but I don't understand how the data is actually stored, what is the starting object etc"
Kurta put in from modelsizes.inc before, which I've provided the same format as modelsizes.inc above. It starts at 0 and needs to go up to 19999 (above I do that, before it only went to 19903). It's pretty simple, just look at it.
If you mean inside the plugin, well Kurta used the include before so I provided the same formatting as it was before.
Re: YSF - kurta999's version -
IllidanS4 - 21.05.2015
Please fix the player list issue, kurta, it worked in pre 3, I think.
Re: YSF - kurta999's version -
IllidanS4 - 23.05.2015
Nor SetPlayerGravity works in pre 4.