12.09.2009, 14:40
Thanks to all responses. After this:
I started making my own.
For the sake of anybody else who has had this problem, this is the code i used:
To all nitpickers (lots of you out there): My script doesn't have more than 256 cars, so there won't be a problem with it.
Quote:
Originally Posted by TimmehBoy
No, you have to make your own function(s).
|
For the sake of anybody else who has had this problem, this is the code i used:
Код:
new CarColour[256]; ..... public OnGameModeInit() { ColourAddStaticVehicle(476,-1657.362061,-155.683640,15.318590, 270,1,1); ColourAddStaticVehicle(476,-1647.219849,-165.189056,15.318590, 270,1,1); return 1; } ..... stock FindCarColour(playerid) { if (!IsPlayerConnected(playerid) || !IsPlayerInAnyVehicle(playerid)) return 0; return CarColour[GetPlayerVehicleID(playerid)]; } stock ColourAddStaticVehicle(ModelID,Float:spawn_X,Float:spawn_Y,Float:spawn_Z, Float:zangle, C1,C2) { new carID; carID = AddStaticVehicle(ModelID,spawn_X,spawn_Y,spawn_Z,zangle,C1,C2); CarColour[carID] = C1; return carID; }