OnPlayerShot?
#6

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Do you want the market to show whenever the player shoots? Even if the no one gets hit?
If so, loop using for or foreach, and get every player that isn't on the shooter's team.
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    for (new i = 0, j = GetPlayerPoolSize(); i != j; i++)
    {
        if (gTeam[playerid] != gTeam[i])
        {
    	    // ...
	}
    }
    return 1;
}
Thanks iґll try.
This wonґt work? for(new i = 0; i < MAX_PLAYERS; i++)
Look i have this code, can someone help me?
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gTeam[playerid] == Terroristas && gTeam[i] != Terroristas)
       	{
 			   SetPlayerMarkerForPlayer(i, playerid, RojoMarcado);
		}
		if(IsPlayerConnected(i) && gTeam[playerid] == Policias && gTeam[i] != Policias)
       	{
		    	SetPlayerMarkerForPlayer(i, playerid, AzulMarcado);
		}
	}
    return 1;
}
Reply


Messages In This Thread
OnPlayerShot? - by karoliko - 24.05.2016, 20:15
Re: OnPlayerShot? - by Stinged - 24.05.2016, 20:19
Re: OnPlayerShot? - by karoliko - 24.05.2016, 20:22
Re: OnPlayerShot? - by Stinged - 24.05.2016, 20:29
Re: OnPlayerShot? - by oMa37 - 24.05.2016, 20:30
Re: OnPlayerShot? - by karoliko - 24.05.2016, 20:38
Re: OnPlayerShot? - by MBilal - 24.05.2016, 20:48
Re: OnPlayerShot? - by Stinged - 24.05.2016, 21:02
Re: OnPlayerShot? - by karoliko - 24.05.2016, 21:12
Re: OnPlayerShot? - by Stinged - 24.05.2016, 21:19

Forum Jump:


Users browsing this thread: 2 Guest(s)