13.12.2017, 09:29
How do we when we are standing in the radius of some textdraw will appear, while out of the radius will hide Textdraw.
My English is not good. Sorry
My English is not good. Sorry
new my_area;
public OnGameModeInit()
{
my_area = CreateDynamicSphere(x, y, z, radius); // Create the area, in this case it's a 3D sphere.
return 1;
}
public OnPlayerEnterDynamicArea(playerid, areaid)
{
if(areaid == my_area)
{
TextDrawShowForPlayer(playerid, my_textdraw); // Show the TD when entering the area.
return 1;
}
return 1;
}
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
if(areaid == my_area)
{
TextDrawHideForPlayer(playerid, my_textdraw); // Hide the TD when leaving the area.
return 1;
}
return 1;
}
Get Incognito's streamer and make use of the dynamic areas, for example:
PHP код:
|
Get Incognito's streamer and make use of the dynamic areas, for example:
PHP код:
|
//============================================================================== stock Tutorial1Timer(playerid, time) { tutorial1extimer[playerid] = SetTimerEx("Tutorial1Timer2", time, true, "i", playerid); } forward Tutorial1Timer2(playerid); public Tutorial1Timer2(playerid) { if(!IsPlayerInRangeOfPoint(playerid, 5.0, 3603.6953,-1503.7928,9.6853)) { if(DoingTutorial1[playerid] == 1 || DoingTutorial2[playerid] == 1) { SetPlayerPos(playerid,3603.6953,-1503.7928,9.6853); ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Tutorial", "Complete the tutorial first", "OK", ""); } else { KillTimer(tutorial1extimer[playerid]); } } }
new Float:DCx,Float:DCy,Float:DCz; // dc - dynamic circle DCx = ParkZone[x][pzPosX]; DCy = ParkZone[x][pzPosY]; DCz = ParkZone[x][pzPosZ]; CreateDynamicCircle (DCx, DCy, DCz, ratius);