[HELP] Color + MapIcon Problem [HELP]
#1

ok well a phew problems .. hope someone will help, before you say " SEARCH ! " iv'e searched. trust me.. well heres the questions

1). How to make your player color flash, like.. on a server i was on it had a flag and ur color flashes from blue to red to blue to red , How ?

2). how to attach a MapIcon to a vehicle / object / player, like on the capture the flag minigame on a server i was on also .

anyone can answer me lol? .. and all i found wen i searched " flag " or " CTF " is " [GM] Capture the flag BLAH BLAH, id'e rather a FS so i can look thru the FS too see how they do the stuff.. well, thanks in advanced.

~Cr@zY! J?e~
Reply
#2

Player Color can flash useig a timer that sets a players color from blue to red and back about attaching a map icon to a player or vehicle i think you should also use a timer then get the player/vehicles coordinates and re create the map icon in that position
Reply
#3

CHEERS FOR THE QUICK REPLY like .. 1 min also.. ill go and see what i can do lol.. thanks

~ Cr@zY! J?e ~
Reply
#4

Quote:
Originally Posted by Cr@zY!_J?E
CHEERS FOR THE QUICK REPLY like .. 1 min also.. ill go and see what i can do lol.. thanks

~ Cr@zY! J?e ~
you are welcome if you come up with some problems i will help
Reply
#5

Problem straight away , well it works right but .. it goes blue then it goes red and tooooo quickly like.. 1/4 of a second it goes blue again. id'e like it to change say.. 2 seconds .. not 1/4 second. iv'e write 2000 - is that 2seconds in milliseconds? also.. i crash after about 30 seconds + my sa-mp server to

top of script:
Код:
forward ChangeColor(playerid);
forward ChangeColor2(playerid);
under OnPlayerSpawn (only this line )
Код:
ChangeColor(playerid);
the publics
Код:
public ChangeColor(playerid)
{
	SetPlayerColor(playerid, red);
	SetTimerEx("ChangeColor2", 2000, false, "i", playerid);
	return 1;
}

public ChangeColor2(playerid)
{
	SetPlayerColor(playerid, blue);
	SetTimerEx("ChangeColor", 2000, false, "i", playerid);
	return 1;
}
can u tell me whats wrong if you know? thanks.

~Cr@zY! J?e~
Reply
#6

Great, i tried this and it worked..but...how can i turn it off again LOL
Reply
#7

Assign a variabele to the timers, like so:

pawn Код:
new FlashColor[2];
forward StopFlash(playerid);

FlashColor[0] = SetTimerEx();
FlashColor[1] = SetTimerEx();

public StopFlash(playerid);
{
  for(new i = 0; i <= sizeof(FlashColor); i++)
  {
    KillTimer(FlashColor[i]);
  }
  SetPlayerColor(playerid, default);
  return 1;
}

Reply
#8

Thanks thats great!
Reply
#9

Quote:
Originally Posted by NoxY
Problem straight away , well it works right but .. it goes blue then it goes red and tooooo quickly like.. 1/4 of a second it goes blue again. id'e like it to change say.. 2 seconds .. not 1/4 second. iv'e write 2000 - is that 2seconds in milliseconds? also.. i crash after about 30 seconds + my sa-mp server to

top of script:
Код:
forward ChangeColor(playerid);
forward ChangeColor2(playerid);
under OnPlayerSpawn (only this line )
Код:
ChangeColor(playerid);
the publics
Код:
public ChangeColor(playerid)
{
	SetPlayerColor(playerid, red);
	SetTimerEx("ChangeColor2", 2000, false, "i", playerid);
	return 1;
}

public ChangeColor2(playerid)
{
	SetPlayerColor(playerid, blue);
	SetTimerEx("ChangeColor", 2000, false, "i", playerid);
	return 1;
}
can u tell me whats wrong if you know? thanks.

~Cr@zY! J?e~
maybe increasing the interval?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)