[HELP] Shoot visible on Map
#1

Hi guys,
how can I make visible the marker when the player fires with a weapon?

When player shoot, your marker is visible..

thanks in advance.
Reply
#2

Little UP!
Reply
#3

I heard about a callback called OnPlayerShootPlayer, you can use that. Or check if the player pressed the KEY_FIRE.
Reply
#4

With OnPlayerShootPlayer it's possible, yes!

Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if(InDM[playerid] == 1)
{
//What can I use for others to see my marker?
//SetPlayerMarkerForPlayer ? ShowPlayerMarkers ?
}
return 1;
}
Thanks for reply
Reply
#5

You can use SetPlayerColor with an opacity of 0. If I can assume it is the player markers on the minimap? Else please explain what the markers are
Reply
#6

Yes, I could use the setplayercolor, but.. If I have a team deathmatch with different colors?
Of course I could do:
Light Blue -> My Team
Red -> opposing team . Red when shoot and Trasparent when it doesn't shoot

Right?

thanks again

*Sorry my bad english..
Reply
#7

Exactly. You can change the transparency of a dot with SetplayerColor: More info on The samp wiki Section: Colors list > Alpha Values
Reply
#8

Ok, but how to re put the color before?

Es:

when shoot : SetPlayerColor(playerid, RED); and when doesn't shoot?
Reply
#9

Shooting: SetPlayerColor(playerid, 0xFF0000FF); // fully visible
Not shooting: SetPlayerColor(playerid, 0xFF000077); // half visible

(colors are an example- though HEX value is RED)
Reply
#10

Yes, I understand, but where I put this? (SetPlayerColor(playerid, 0xFF000077) ?

Es :

Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if(InDM[playerid] == 1)
{
SetPlayerColor(playerid, 0xFF0000FF);
}
return 1;
}
where I put setplayercolor invisible?
thank you for your patience.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)