Post: Bunker + teleport flags [1.18/source]
07-08-2014, 03:11 AM #1
(adsbygoogle = window.adsbygoogle || []).push({});
You must login or register to view this content.
I decided to make a bunker today then I realized I couldn't reach the thing so I made some teleport flags. Happy I thought that maybe some of you may want to see how I did it so enjoy the source Smile

Update:
So I was running into an issue so after about 5 hours and a little bit of math I came up with a function that would calculate the radius of a circle and if some on is in it Smile fixed the radius error Happy
     
public bool in_circle(int center_x, int center_y, int radius, int x, int y)
{
int dist = ((center_x - x) * (center_x - x)) + ((center_y - y) * (center_y - y));
if (dist < (radius * radius))
{
return true;
}
else if (dist > (radius * radius))
{
return false;
}
else
{
return false;
}
}

an example for the teleport flags is:
    
if (in_circle(18, 4409, 25, X, Y) == true)
{
RPC.iPrintln(-1, "You're in the radius!");
}

Enjoy Happy
Video:

Source:
Download:
You must login or register to view this content.
Tool:
Download:
You must login or register to view this content.
Virus Scan:
[url]https://www.virustotal.com/en/file/3e8f1fbadd76b14617ec9f86f22d5d2e8576a6830d6ae366ee 029ed552a0259e/analysis/1404788821/[/url]
(adsbygoogle = window.adsbygoogle || []).push({});

The following 31 users say thank you to OLDSCHOOLMODZHD for this useful post:

ᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟ, RawDog2002, ALI ALHILFI, ARABIC_GUY, B777x, codybenti, D3sKmَ, Drop_, En3RGyMoDz, Esker, Geo, hibye3, iMoDz-Baptiste, ImPiffHD, Jaredm09, kainer wainer, LaRip8, Lim-its, ll-TheUpdater-l, Mango_Knife, MilkShakeModz, moxl, RTE, SC58, Shark, UnknownNightmare, Laser, Hash847, zRayz-
07-14-2014, 02:36 PM #20
Nice m8 Needa

The following user thanked ll-TheUpdater-l for this useful post:

OLDSCHOOLMODZHD

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo