Post: Spawn Turrets [C#] [1.16]
04-24-2014, 03:54 AM #1
Shark
Retired.
(adsbygoogle = window.adsbygoogle || []).push({}); Hey, I worked this out a few days ago and thought I would share it with you, it is one of the funner mods :fa:

Here Is An Example of What It does Needa

You must login or register to view this content.


C# Code
    public static Int32 G_Spawn()
{
return RPC.Call(0x278C60);//G_Spawn
}

public static UInt32 spawnTurret(String TurretType, String ModelName, float[] Origin, float[] Angles)
{
UInt32 Ent = (uint)G_Spawn();
Lib.WriteSingle(Ent + 0x134, Origin);//Set Origin
Lib.WriteSingle(Ent + 0x140, Angles);//Set Angles
RPC.Call(0x277644, Ent, ModelName);//Set Turret Model
RPC.Call(0x2BA5C8, Ent, TurretType);//G_SpawnTurret
return Ent;
}



Turret Types
auto_gun_turret_mp //Works on All Maps (Normal Sentry Gun)
heli_gunner_rockets_mp //Works on All Maps (Shoots VTOL Warship Missile Shells)
straferun_rockets_mp //Works on All Maps (Missiles That Explode)
chopper_minigun_mp //Works on All Maps (VTOL Warship Turret)
mounted_turret_stand //Must Be Precached (Works on Turbine Without Precache)


Turret Models
t6_wpn_turret_sentry_gun //Only one that I have found that fits a turret :p


How To Call It
    
spawnTurret(TurretType, Model, Origin. Angle);



I worked all this out myself by looking at gsc codes from mw2 so I dont think I need to give credits if I do feel free to tell me who... :p
(adsbygoogle = window.adsbygoogle || []).push({});

The following 17 users say thank you to Shark for this useful post:

-SuperMan, A Friend, ALI ALHILFI, BoatyMcBoatFace, D3skm, Frontality0123, FusionIsDaName, JLM, ImAzazel, MegaMister, Notorious, SnaY, TheGreenPlanet, Hash847, Xx-GIPPI-xX
04-24-2014, 04:00 AM #2
woofdawg233
Tokin' on Dat GreenStuff
can i get a download to the tool?
04-24-2014, 05:30 AM #3
Hash847
Purple God
*COUGH* I gave him the idea Winky Winky Winky Winky Winky Winky
04-24-2014, 06:47 AM #4
seb5594
Proud Former Admin
Pretty sweet shark, keep it up Smile
Long time ago i have seen something new to RTM stuff McCoy
Continue your work!

The following user thanked seb5594 for this useful post:

JLM
04-24-2014, 11:29 AM #5
Coool

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo