[HELP] Shoot visible on Map -
PryX0G3n - 12.09.2012
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.
Re: [HELP] Shoot visible on Map -
PryX0G3n - 12.09.2012
Little UP!
Re: [HELP] Shoot visible on Map -
mamorunl - 12.09.2012
I heard about a callback called OnPlayerShootPlayer, you can use that. Or check if the player pressed the KEY_FIRE.
Re: [HELP] Shoot visible on Map -
PryX0G3n - 12.09.2012
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
Re: [HELP] Shoot visible on Map -
mamorunl - 12.09.2012
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
Re: [HELP] Shoot visible on Map -
PryX0G3n - 12.09.2012
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..
Re: [HELP] Shoot visible on Map -
mamorunl - 12.09.2012
Exactly. You can change the transparency of a dot with SetplayerColor: More info on
The samp wiki Section: Colors list > Alpha Values
Re: [HELP] Shoot visible on Map -
PryX0G3n - 12.09.2012
Ok, but how to re put the color before?
Es:
when shoot : SetPlayerColor(playerid, RED); and when doesn't shoot?
Re: [HELP] Shoot visible on Map -
mamorunl - 12.09.2012
Shooting: SetPlayerColor(playerid, 0xFF0000FF); // fully visible
Not shooting: SetPlayerColor(playerid, 0xFF000077); // half visible
(colors are an example- though HEX value is RED)
Re: [HELP] Shoot visible on Map -
PryX0G3n - 12.09.2012
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.