GangZoneShowForAll

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:53, 21 April 2014
MP2 (Talk | contribs)

← Previous diff
Current revision
OstGot (Talk | contribs)

Line 5: Line 5:
{{Parameters|zone, color}} {{Parameters|zone, color}}
{{Param|zone|The ID of the gangzone to show (returned by [[GangZoneCreate]]).}} {{Param|zone|The ID of the gangzone to show (returned by [[GangZoneCreate]]).}}
-{{Param|color|The color of the gangzone.}}+{{Param|color|The color to show the gang zone, as an integer or hex in '''RGBA''' color format. Alpha transparency supported.}}
{{ReturnsSuccess|The gang zone was shown for all players.|The gangzone does not exist.}} {{ReturnsSuccess|The gang zone was shown for all players.|The gangzone does not exist.}}

Current revision



Description:

Shows a gangzone with the desired color to all players.


Parameters:
(zone, color)
zoneThe ID of the gangzone to show (returned by GangZoneCreate).
colorThe color to show the gang zone, as an integer or hex in RGBA color format. Alpha transparency supported.


Return Values:

  • 1: The function executed successfully. The gang zone was shown for all players.
  • 0: The function failed to execute. The gangzone does not exist.


Example Usage:

new gangzone;
 
public OnGameModeInit()
{
    gangzone = GangZoneCreate(1248.011, 2072.804, 1439.348, 2204.319);
    return 1;
}
 
public OnPlayerSpawn(playerid)
{
    if(IsPlayerAdmin(playerid)) GangZoneShowForAll(gangzone,COLOR_RED);
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
In other languages