IsValidObjectModelID for objects
#1

Hey!

I need a 'function' which returns true or false if object model ID exists... It's something like IsValidObjectModelID(modelid), but I couldn't find anywhere and there are thousands IDs I would need to check is valid or not (it would take days!).

Thanks for anwsers.
Reply
#2

pawn Код:
public IsValidObjectID( objectid )
{
    if(
    //weapons
    ( objectid >= 321 && objectid <= 326 )
    || ( objectid >= 330 && objectid <= 331 )
    || ( objectid >= 333 && objectid <= 339 )
    || ( objectid >= 341 && objectid <= 344 )
    || ( objectid >= 346 && objectid <= 363 )
    || ( objectid >= 365 && objectid <= 372 )

    //fun stuff
    || ( objectid >= 1433 && objectid <= 13594 )

    //roads
    || ( objectid >= 5482 && objectid <= 5512 )

    //barriers
    || ( objectid >= 966 && objectid <= 998 )

    //misc 1210-1325
    || ( objectid >= 1210 && objectid <= 1325 )

    //misc 1420-1620
    || ( objectid >= 1420 && objectid <= 1620 )

    //misc 1971-4522
    || ( objectid >= 1971 && objectid <= 4522 ) )
    {
     return 1;
    }
    return 0;
}
dont have the 0.3c objects i think...
Reply
#3

I have the array of Valid objects with their names in the script of this FS: https://sampforum.blast.hk/showthread.php?tid=282883
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)