[Include] GetVehicleColor v2.1 [NEW UPDATE - 02/08/2011]
#21

don't work for me -_- not returning color when i used col1 = random(100)
Reply
#22

NEW update v2.1. See changelog in first page.

Not a real necessarily update if you don't use '-1' as color. But it's better to update always.
Reply
#23

TY! after this update its working perfectly! :P
Reply
#24

Just what i was looking for Nice done
Reply
#25

I appreciate the update! I am currently out of town but I get back in tomorrow evening and will hopefully have a chance to see how this works with my scripts...
Reply
#26

Thanks - let me know if there are other problems.
Reply
#27

wery niccce
Reply
#28

Ok Thx +Rep For a Great Script i needed it Great Job RyDeR`

Nice Rep Score BTW
Reply
#29

Can This be used for if when the player gets out of the car it gets the player facing angle, the Model and the Position and use this too get the vehicle colour and use that too create a new car?
Reply
#30

Quote:
Originally Posted by Zonoya
Посмотреть сообщение
Can This be used for if when the player gets out of the car it gets the player facing angle, the Model and the Position and use this too get the vehicle colour and use that too create a new car?
Yes.
Reply
#31

but is it a correct value ??

pawn Code:
new Colorz1,Colorz2;
        GetVehicleColor(AutopoeAuto[playerid], Colorz1,Colorz2);
        SetPVarInt(playerid, "CC", Colorz2);
it still gives me the black car when i use SetPVarInt for carcolors.-
Reply
#32

Code:
Current directory: E:\GTA San Andreas\Server 0.3d STROAD\gamemodes
E:\GTA San Andreas\Server 0.3d STROAD\Notepad++\PAWNO\include\GetVehicleColor.inc(1) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
================ READY ================
I included the file as said. I'm using 0.3d.
Reply
#33

Nice one Ryder,
Reply
#34

Please redefine `hooks` using ALS by default as mostly it is used in other includes.

pawn Code:
#if defined _ALS_AddStaticVehicle
    #undef AddStaticVehicle
#else
    #define _ALS_AddStaticVehicle
#endif
#define AddStaticVehicle n_AddStaticVehicle

#if defined _ALS_AddStaticVehicleEx
    #undef AddStaticVehicleEx
#else
    #define _ALS_AddStaticVehicleEx
#endif
#define AddStaticVehicleEx n_AddStaticVehicleEx

#if defined _ALS_CreateVehicle
    #undef CreateVehicle
#else
    #define _ALS_CreateVehicle
#endif
#define CreateVehicle n_CreateVehicle

#if defined _ALS_DestroyVehicle
    #undef DestroyVehicle
#else
    #define _ALS_DestroyVehicle
#endif
#define DestroyVehicle n_DestroyVehicle

#if defined _ALS_ChangeVehicleColor
    #undef ChangeVehicleColor
#else
    #define _ALS_ChangeVehicleColor
#endif
#define ChangeVehicleColor n_ChangeVehicleColor

#if defined _ALS_OnVehicleRespray
    #undef OnVehicleRespray
#else
    #define _ALS_OnVehicleRespray
#endif
#define OnVehicleRespray n_OnVehicleRespray
forward n_OnVehicleRespray(playerid, vehicleid, color1, color2);
Reply
#35

nice work!
I missed this looking threw before, thanks!
Reply
#36

Perfect, I've been searching my ass off to see if there was a way to get colors of a car. This should be one of the SA-MP natives.
Reply
#37

When i download this it come on txt how i can make into inc?
Reply
#38

good job +repped!
Reply
#39

Why am I getting these warns ?
Код:
pawno\include\GetVehicleColor.inc(15) : warning 219: local variable "color1" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(15) : warning 219: local variable "color2" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(33) : warning 219: local variable "color1" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(33) : warning 219: local variable "color2" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(51) : warning 219: local variable "color1" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(51) : warning 219: local variable "color2" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(76) : warning 219: local variable "color1" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(76) : warning 219: local variable "color2" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(87) : warning 219: local variable "color1" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(87) : warning 219: local variable "color2" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(102) : warning 219: local variable "color1" shadows a variable at a preceding level
pawno\include\GetVehicleColor.inc(102) : warning 219: local variable "color2" shadows a variable at a preceding level
Oh, Fixed it by removing : new color1,color2; in my FS,
You added this in your example...

I use this:
Код:
   new col1, col2
   GetVehicleColor(GetPlayerVehicleID(0), col1, col2);
    printf("cols %d, %d", col1, col2;
It prints out 0,0... what's wrong ?
Reply
#40

This include needs to be updates for the latest sa-mp, when you try to compile with this include in your gamemode you get

Код:
gamemodes\wip.pwn(6176) : warning 202: number of arguments does not match definition
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)