SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 04/08/2018, 02:01 AM   #1
DBZdabIt3Bro7
Banned
 
Join Date: Sep 2017
Location: Lovely name, right?
Posts: 77
Reputation: 8
Default SA:MP vehicle colors named.

since i basically needed a list of hte SAMP vehicle colors in a name format and i couldn't find it anywhere, i took use of the NTC JavaScript library (created by Chirag Mehta) and wrote a quick script to convert all vehicle hex colors to an array of names (pawn format)

https://api.hamiltondev.net/sampNTC.php

the script will automatically run and display the code when you visit. make sure to force SSL so that the document sends a HTTPS request to the jquery file.


quick example of its usage:

DBZdabIt3Bro7 is offline   Reply With Quote
Old 04/08/2018, 03:19 AM   #2
Akeem
Big Clucker
 
Join Date: Aug 2017
Location: Guyana
Posts: 88
Reputation: 0
Default Re: SA:MP vehicle colors named.

Sweet script
Akeem is offline   Reply With Quote
Old 04/08/2018, 06:14 AM   #3
Verc
Big Clucker
 
Verc's Avatar
 
Join Date: Apr 2018
Location: 🇯🇵
Posts: 180
Reputation: 29
Default Re: SA:MP vehicle colors named.

You might want to post the example script too.
__________________
nico
Verc is offline   Reply With Quote
Old 04/08/2018, 11:32 AM   #4
DBZdabIt3Bro7
Banned
 
Join Date: Sep 2017
Location: Lovely name, right?
Posts: 77
Reputation: 8
Default Re: SA:MP vehicle colors named.

Quote:
Originally Posted by Verc View Post
You might want to post the example script too.
then i might reconsider re-creating the wheel as well. there's nothing advanced in using an array in PAWN. if someone doesn't know how to use an array, they shouldn't be scripting yet.
DBZdabIt3Bro7 is offline   Reply With Quote
Old 04/08/2018, 12:12 PM   #5
Spydah
High-roller
 
Spydah's Avatar
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 1,494
Reputation: 743
Default Re: SA:MP vehicle colors named.

Cool how many colors are there ahha
__________________

Sexy isn't she?
I don't like +REP askers.
Spydah is offline   Reply With Quote
Old 04/08/2018, 12:35 PM   #6
DBZdabIt3Bro7
Banned
 
Join Date: Sep 2017
Location: Lovely name, right?
Posts: 77
Reputation: 8
Spray Re: SA:MP vehicle colors named.

Quote:
Originally Posted by Spydah View Post
Cool how many colors are there ahha
gta sa vehicle colors - 128 (256 / )
samp vehicle colors - 128 (256 / 2)
named vehicle colors - 256
worldwide colors - 16 581 375 (256 ^ 3)
ntc library colors - ~1500, however, its scripting uses a math query to select the most matching color palette
DBZdabIt3Bro7 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] vFunc - Synced random vehicle colors (-1), GetVehicleColor and more vehicle-related functions (UPDATED FOR 0.3.7) MP2 Includes 41 22/07/2016 08:17 AM
[Include] Hex colors to vehicle colors lleps Includes 2 26/01/2016 10:21 PM
How do i see the Vehicle Colors? Kypros Scripting Help 12 16/06/2015 01:16 PM
Please help, something regarding the vehicle colors. Biggy54 Scripting Help 12 15/09/2014 11:31 AM
Vehicle Colors NewbBeginner Help Archive 3 22/01/2011 02:51 PM


All times are GMT. The time now is 06:57 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.