General Reference
#61

Can someone reffer me to the topic that has a tutorial on How to insert SA-MP 0.3c's custom objects into MTA-SA ( If I remember right the tutorial is POSTED no download or anything... )

Thanx in advance
Reply
#62

good topic wow
Reply
#63

64 is the limit of the caption box in ShowPlayerDialog. If you exceed the limit the string will begin to cut off.
Reply
#64

What's the key number of F2 and F3?
Reply
#65

Quote:
Originally Posted by Superthijs
Посмотреть сообщение
What's the key number of F2 and F3?
There is no key number for F2 and F3 yet.
Reply
#66

There is the vkey plugin ?
Reply
#67

A list of available sounds in 0.3d to be used with PlayerPlaySound.
Reply
#68

Quote:
Originally Posted by Blantas
Посмотреть сообщение
Wow, thanks!

Btw, here's an array containing all valid sound IDs for anyone who needs them (Made by me and Tomo): http://pastebin.com/sA5DNFaw
Reply
#69

Edit - See the post after mine for a much better version of this.

Audio IDs matched to the dialogue spoken during the audio. Uses the SA subtitles, so anything that isn't a subtitle isn't included. There are a few cases of dialogue being left out, mainly where the subtitle existed but didn't have an audio file to go with it (more details after the links).

Started working on this just after I made the valid audio ID array for Garsino, then noticed he was after something like this too. So there's two versions. Firstly just the string followed by the ID -

"Grove Street's going down!", 4000
"Fuck them Grove Street fools!", 4001
etc.

Found here - http://pastebin.com/ufE8LnFe (updated to fix a couple of problems found)

Secondly the version Garsino asked me to put together (if anyone wants it formatted in a different way, feel free to ask me here, or on IRC (I go by Tomo on IRC)) -

{!"Grove Street's going down!", 4000},
{!"Fuck them Grove Street fools!", 4001},
etc. (no comma on the last one, just so you know)

Found here - http://pastebin.com/4k35ypFB (Also updated)

You can do whatever you like with either of these files.

-Just some details below here, the content of both links works fine without reading this-

Firstly, there are almost certainly more audio files with dialogue in them. But I'm guessing some either didn't make it into the final game, or aren't subtitled for whatever reason. These files are way beyond the scope of what I was doing here.

If you're wondering about the order, it's alphabetical going by SA's internal audio file names with "SOUND_" removed from each of them. That is -

BALLA_1 (instead of SOUND_BALLA_1)
BALLA_2
BBOX_1
etc.

I used the names to match the IDs to the subtitles, then removed the names. I realised this made it look like there was no obvious order so I thought I should mention it. For the most part, the audio IDs increase down the list though.

Most of the removed lines were because the subtitle had no audio file to go with it. I think this is a complete list of those.

SOUND_TRU2_OB (this is "Dialing" or something similar, I'm guessing it uses a different phone ringing audio file)
SOUND_RYD1_DA
SOUND_SYN1_2D
SOUND_SWE1_UD
SOUND_HE3_HD -> SOUND_HE3_HJ
SOUND_CAS11_AC
SOUND_CAS11_AD
SOUND_DES8_MC
SOUND_GF_1A -> SOUND_GF_4C
SOUND_HE8_ZC

Might be a bit off, but I keep handwritten notes about everything as I hate having to switch between programs just to keep notes. I'm pretty sure the list is right but I might have misread something I wrote. It doesn't really matter either way, the matched IDs/subtitles still work fine. I just wanted to make people aware that there will be some missing lines.

I also removed some dialogue from the opening cutscene. I know for a fact that the audio is in there somewhere, but the names didn't match so I couldn't find it. SOUND_PRO@24 -> SOUND_PRO@49, in case anyone was interested.

Finally, some of the dialogue from the mission Architectural Espionage was a bit odd. The audio file names were either missing a letter or had one letter too many. I think there were nine occurrences of this, all of them starting with SOUND_HEQ or SOUND_HEX. For example -

SOUND_HEQ1
SOUND_HEIQ1

Both refer to audio ID 19200. It was easy enough to match them up manually, I just thought I should mention it in case anyone got confused.

Anyway, enjoy.
Reply
#70

Myself, [NoV]LaZ and a bunch of our other Novocaine clan members have worked a fair few hours to provide character names for each sound.

It was a labour of love!

95% correct, and thanks to the work of Garsino and Tomo for the array and subtitle text.

http://pastebin.com/uc3gjb3M
Reply
#71

Quote:
Originally Posted by ******
Посмотреть сообщение
OK, that literally (and I use that word accurately) made my jaw drop and say wow! That possibly the best piece of (I imagine very tedious) work I've seen in a long time!
Couldn't agree more. I think he said on IRC it took a group of people a few hours each to get it done. My original list took about twenty minutes to generate, so fair play to them. I'm looking into the remaining 1000 or so sounds not yet listed.
Reply
#72

Quote:
Originally Posted by Austin
Посмотреть сообщение
Myself, [NoV]LaZ and a bunch of our other Novocaine clan members have worked a fair few hours to provide character names for each sound.

It was a labour of love!

95% correct, and thanks to the work of Garsino and Tomo for the array and subtitle text.

http://pastebin.com/uc3gjb3M
Wow, well done. I've given you rep. Just like to say thanks although I wont be using it, it will be useful for others.
Reply
#73

Some information about vehicles models (GetVehicleModelInfo): http://pastebin.com/raw.php?i=Squ0qHyA
Reply
#74

List of all cars that can do a burnout:
pawn Код:
new burnoutcars[130] =
{400,
402,
403,
405,
406,
407,
408,
409,
411,
412,
413,
414,
415,
416,
418,
419,
421,
422,
423,
424,
426,
427,
428,
429,
431,
432,
433,
434,
437,
438,
439,
442,
443,
444,
451,
455,
456,
457,
458,
459,
466,
467,
470,
471,
474,
475,
477,
478,
480,
482,
483,
485,
486,
489,
490,
491,
492,
494,
495,
498,
499,
502,
503,
504,
505,
506,
507,
508,
514,
515,
517,
518,
524,
525,
526,
500,
527,
528,
529,
531,
532,
533,
534,
535,
536,
541,
542,
543,
544,
545,
546,
547,
549,
551,
552,
554,
555,
556,
557,
558,
560,
561,
562,
566,
567,
568,
571,
572,
573,
574,
575,
576,
578,
579,
580,
582,
583,
585,
587,
588,
596,
597,
598,
599,
601,
602,
603,
604,
605,
609
};
Reply
#75

I recently read this thread https://sampforum.blast.hk/showthread.php?tid=356637.

And i thought it might be useful to have a database with all valid objectids in it. You can also add your own ids to the database easily if you have created your own objects.

I created it from the valid_model array from the pastebin link in that thread. So credits go to whoever made that. It was posted by guest. http://pastebin.com/xgMrfNNK

Here's the database

Valid object database (should go in scriptfiles folder): https://dl.dropbox.com/u/76608104/valid_objects.db

So you can do normal sqlite queries with the database.

Eg,
pawn Код:
db_IsValidObject(objectid)
{

    new
        szBuffer[64],
        DBResult: dbrResult,
        DB: db_ValidObjects = db_open("valid_objects.db");
   
    format(szBuffer, sizeof(szBuffer), "SELECT null FROM objects WHERE objectid=%d", objectid);
   
    dbrResult = db_query(db_ValidObjects, szBuffer);
   
    if(db_num_rows(dbrResult))
    {
        db_free_result(dbrResult);
        db_close(db_ValidObjects);
        return 1;
    }
    db_free_result(dbrResult);
    db_close(db_ValidObjects);
    return 0;
}
EDIT: I posted the created database because it takes a while to generate. I think it took about 30 seconds on my PC.

This was how it was created.
pawn Код:
new
    szBuffer[64],
    DB: db_ValidObjects = db_open("valid_objects.db");

db_query(db_ValidObjects, "CREATE TABLE IF NOT EXISTS objects (objectid INTEGER)");

for(new i=0; i < sizeof(valid_model); ++i)
{
    format(szBuffer, sizeof(szBuffer), "INSERT INTO objects VALUES (%d)", valid_model[i]);
    db_query(db_ValidObjects, szBuffer);
}

db_close(db_ValidObjects);
Wasn't sure whether to post here or snippets, i thought here would be better because its a DB not code.
Reply
#76

Why not use the compressed array by Slice? He wrote a PHP code, which you can run after every SA-MP update to fetch all valid object models from GTASA directory.
Reply
#77

Not sure how to use it TBH.
Reply
#78

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Not sure how to use it TBH.
You can run it offline on WAMP Server. After you've installed it, open wamp folder, then open www folder and create a project folder. Paste php file in your project folder and run in the browser with localhost/project_folder/filename.php (URL). Though I'm not sure if Slice's code works as it gives me parse error on line 56 when I try to run it (I'm newbie in PHP).
Reply
#79

Quote:
Originally Posted by ******
Посмотреть сообщение
That's got to be VASTLY slower than an O(1) bit check!
Definitely. I thought i might have been useful. (not so much now)

The thread i linked has been updated with a much better method to check if an object is valid. I don't understand how it works yet but i suppose i don't need to in order to use it.
Reply
#80

To whom may it concern, note that these constructs are perfectly legal (though I do not know if it would be sane to use them, just general info, these are both deprecated and obsolete AFAIK):
Код:
if expression *then expression
if expression *then { expression }
// note that
// if ( expression ) *then expression
// is not valid
// --------------------------------
// you can also use *begin and *end instead of braces but then you must have *then preceeding them
if expression *then
*begin
    expression
*end
if expression *then *begin expression *end
// note that this kind of construct also can't make use of parentheses
// this is invalid: if ( expression ) *then *begin expression *end
Reply


Forum Jump:


Users browsing this thread: 14 Guest(s)