Rules FAQ Members List Search Register Login

 Raised This Month: \$114 Target: \$400 28%

Author Message
stephen473
Senior Member
Join Date: Jan 2017
Location: somewhere on earth
 04-13-2017 , 17:44   Make a circle #1 Hi guys i tried to make a plugin which teleport terrorist on a circle here is my code: HTML Code: ```void Circle(int target, int radius) { int d = radius; float newpos[3]; float targetpos[3]; GetClientAbsOrigin(target, targetpos); for (int i = 1; i <= MaxClients; i++) { if (IsClientInGame(i) && IsPlayerAlive(i) && target != i && GetClientTeam(i) == 2) { float x = (Cosine(PI * 2 * i / n) * d); float y = (Sine(PI * 2 * i / n) * d); newpos[0] = targetpos[0] + x; newpos[1] = targetpos[1] + y; newpos[2] = targetpos[2]; float vec[3]; SubtractVectors(targetpos, newpos, vec); NormalizeVector(vec, vec); float angles[3]; GetVectorAngles(vec, angles); TeleportEntity(i, newpos, angles, NULL_VECTOR); } } }``` but not working,can someone fix this?
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
 04-13-2017 , 17:58   Re: Make a circle #2 https://forums.alliedmods.net/showth...ghlight=circle https://forums.alliedmods.net/showth...ghlight=circle https://github.com/shanapu/MyCircle https://github.com/shanapu/MyCircle/...e.sp#L370-L396 PHP Code: ```     float clientPos[3], ang[3], unitradius;     GetClientAbsOrigin(client, clientPos);     GetClientEyeAngles(client, ang);     unitradius = radius * 52.49343832020997;     for (int i = 0; i < GetArraySize(g_aCircle); i++)     {         float newPos[3], vec[3], angles[3];         newPos[0] = clientPos[0] + (Cosine(DegToRad(angle) * i / GetArraySize(g_aCircle)) * unitradius);         newPos[1] = clientPos[1] + (Sine(DegToRad(angle) * i / GetArraySize(g_aCircle)) * unitradius);         if (gc_bHoverCircle.BoolValue)         {             newPos[2] = clientPos[2] + 10;         }         else         {             newPos[2] = clientPos[2];         }         SubtractVectors(clientPos, newPos, vec);         NormalizeVector(vec, vec);         GetVectorAngles(vec, angles);         int iClient = GetArrayCell(g_aCircle, i);         SetEntityRenderColor(iClient, g_iColorPlayer[0], g_iColorPlayer[1], g_iColorPlayer[2], 255);         TeleportEntity(iClient, newPos, angles, NULL_VECTOR); }  ``` __________________ free software coding

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Server Discussion     Source Servers (SRCDS)     HL1 Servers (HLDS) AMX Mod X     News     Bug Reports     General     Off-Topic     Plugins         Suggestions / Requests         Approved Plugins         New Plugin Submissions         Unapproved/Old Plugins         Translation Request         High-Traffic Plugins             GunGame             UAIO (Ultimate All-In-One Plugin)             xREDIRECT             CSDM             AMX Super             RuneMod             Zombie Plague Mod             SuperHero Mod                 News                 Tech Support                 Scripting Help                 Off-Topic / General Chat                 Heroes                     Suggestions / Requests                     Approved Heroes                     New Submissions                     Unapproved/Old Heroes                         Module Heroes                     SuperHero Mod Stats - By 123                 (OLD) Bug Reports     Scripting         Scripting Help         Code Snippets/Tutorials         Module Coding     Donor Access SourceMod     News     General     Plugins         Plugins         Unapproved Plugins         Plugin/Gameplay Ideas and Requests         High-Traffic Plugins             SourceMod Anti-Cheat             Zombie:Reloaded             SourceBans / SourceBans++             VSH / Freak Fortress             Store             SM_Hosties             HLstatsX:CE     Scripting     Extensions     Snippets and Tutorials     Donor Access     Metamod: Source         Metamod:Source Plugins         Metamod:Source Questions         Coding MM:S Plugins & SM Extensions Hosted Stuff     Asherkin's Plugins         TFDodgeball         TF2Items         SteamTools     Bail's Plugins         CSDM         CS:S DM Off-Topic & Trash     Off-Topic     Trash

All times are GMT -4. The time now is 23:27.

 DMCA - Archive - Top