24.05.2016, 20:38
Quote:
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; } |
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; }