how can i do.....
#1

that every 1 second the vehice will changehis color from a random colors
tanks for helpers
Reply
#2

try this
pawn Код:
// add this in OnGameModeInit

SetTimer("ChaneColor", 1000, true);

forward ChangeColor();
public ChangeColor()
{
  new cRandom;
  cRandom = random(8);
  SetVehicleColor(vehicle id, cRandom);
  return 1;
}
and don't forgot to change the vehicle id by the real veh id !!
Reply
#3

pawn Код:
// add this in OnGameModeInit

SetTimer("ChangeColor", 1000, true);

forward ChangeColor();
public ChangeColor()
{
  new cRandom;
  cRandom = random(8);
  SetVehicleColor(vehicle id, cRandom);
  return 1;
}
Spelled 'Change' wrong in the timer
Reply
#4

Quote:
Originally Posted by xClumx``
pawn Код:
// add this in OnGameModeInit

SetTimer("ChangeColor", 1000, true);

forward ChangeColor();
public ChangeColor()
{
  new cRandom;
  cRandom = random(8);
  SetVehicleColor(vehicle id, cRandom);
  return 1;
}
Spelled 'Change' wrong in the timer
ah ok i missed that
thx
Reply
#5

tanks but how can i add random colors and where i shoult put them?
and what is the line to change vehicle color?
Reply
#6

Quote:
Originally Posted by nuriel8833
tanks but how can i add random colors and where i shoult put them?
and what is the line to change vehicle color?
SetVehicleColor(vehicle id, cRandom); is that line
and random( are the random colors
(random interger from 0-7) so the color can be 0, 1, 2, ..., 7.
Reply
#7

but what lines should i put in the random to make the colors change
Reply
#8

Quote:
Originally Posted by nuriel8833
but what lines should i put in the random to make the colors change
just change random(8) to random(127) or something, to give you more posibilities
Reply
#9

give me an example
Reply
#10

2nd page please help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)