
stdu r1, -0x70(r1)
mflr r0
std r0, 0x70+arg_10(r1)
lis r3, 0x001B
addic r3, r3, 0xCD10 #0x001BCD10 (G_Spawn)
lis r4, 0x14E
addic r4, r4, 0x2200 #0x14E2200 (G_Client)
lfs f1, r4, 0x1C #Reading Your X Origin and Storing it in r5
lfs f2, r4, 0x20 #Reading Your Y Origin and Storing it in r6
lfs f3, r4, 0x24 #Reading Your Z Origin and Storing it in r7
stfs f1, r3, 0x138 #Writing Your X-Origin at G_Spawn + 0x138
stfs f2, r3, 0x13C #Writing Your Y-Origin at G_Spawn + 0x13C
stfs f3, r3, 0x140 #Writing Your Z-Origin at G_Spawn + 0x140
lfs f4, r4, 0x214 #Reading Your X-Angles and Storing it in r8
lfs f5, r4, 0x218 #Reading Your Y-Angles and Storing it in r9
lfs f6, r4, 0x21C #Reading Your Z-Angles and Storing it in r10
stfs f4, r3, 0x144 #Writing Your X-Angles at G_Spawn + 0x144
stfs f5, r3, 0x148 #Writing Your Y-Angles at G_Spawn + 0x148
stfs f6, r3, 0x14C #Writing Your Z-Angles at G_Spawn + 0x14C
bl 0x001BCD10 #Calling G_Spawn
li r3, 0 #Value will be returned here
lis r4, 0x007F
addic r4, r4, 0x62B0 #Address where the model string is stored
bl 0x001BE3F0 #Calling G_SetModel
lis r5, 0x007F
addic r5, r5, 0x63C0 #Address where the turret type string is stored
bl 0x001C8820 #Calling G_SpawnTurret
b end
end:
blr
stdu r1, -0x70(r1)
mflr r0
std r0, 0x70+arg_10(r1)
lis r2, 0x0072
addic r2, r2, 0x4C38
li r3, 0 #Client
li r4, 0x17 #DPAD_RIGHT
bl Key_IsDown #Sorry I don't have the address lmao
cmpwi r3, 0
beq 0xC0 #End of fps else go to start
bl 0x38EDE8 #Calling R_SetFrameFog (you can use a different address amd you should use a different one if you use rpc)
b 0xB8 #End of fps
lis r2, 0x734BE8
addic r2, r2, 0x734BE8
ld r0, 0x70+arg_10(r1)
mtlr r0
addi r1, r1, 0x70
blr

lis r3, 0x001B
addic r3, r3, 0xCD10 #0x001BCD10 (G_Spawn)
lis r4, 0x14E
addic r4, r4, 0x2200 #0x14E2200 (G_Client)
lwz r5, r4, 0x1C #Reading Your X Origin and Storing it in r5
lwz r6, r4, 0x20 #Reading Your Y Origin and Storing it in r6
lwz r7, r4, 0x24 #Reading Your Z Origin and Storing it in r7
stw r5, r3, 0x138 #Writing Your X-Origin at G_Spawn + 0x138
stw r6, r3, 0x13C #Writing Your Y-Origin at G_Spawn + 0x13C
stw r7, r3, 0x140 #Writing Your Z-Origin at G_Spawn + 0x140
lwz r8, r4, 0x214 #Reading Your X-Angles and Storing it in r8
lwz r9, r4, 0x218 #Reading Your Y-Angles and Storing it in r9
lwz r10, r4, 0x21C #Reading Your Z-Angles and Storing it in r10
stw r8, r3, 0x144 #Writing Your X-Angles at G_Spawn + 0x144
stw r9, r3, 0x148 #Writing Your Y-Angles at G_Spawn + 0x148
stw r10, r3, 0x14C #Writing Your Z-Angles at G_Spawn + 0x14C
bl 0x001BCD10 #Calling G_Spawn
li r3, 0 #Value will be returned here
lis r4, 0x007F
addic r4, r4, 0x62B0 #Address where the model string is stored
bl 0x001BE3F0 #Calling G_SetModel
lis r5, 0x007F
addic r5, r5, 0x63C0 #Address where the turret type string is stored
bl 0x001C8820 #Calling G_SpawnTurret
b end
end:
blr
li r3, 0 #Client
li r4, 0x17 #DPAD_RIGHT
bl Key_IsDown #Sorry I don't have the address lmao
cmpwi r3, 0
beq 0xC0 #End of fps else go to start
bl 0x38EDE8 #Calling R_SetFrameFog (you can use a different address amd you should use a different one if you use rpc)
b 0xB8 #End of fps

lis r3, 0x001B
addic r3, r3, 0xCD10 #0x001BCD10 (G_Spawn)
lis r4, 0x14E
addic r4, r4, 0x2200 #0x14E2200 (G_Client)
lwz r5, r4, 0x1C #Reading Your X Origin and Storing it in r5
lwz r6, r4, 0x20 #Reading Your Y Origin and Storing it in r6
lwz r7, r4, 0x24 #Reading Your Z Origin and Storing it in r7
stw r5, r3, 0x138 #Writing Your X-Origin at G_Spawn + 0x138
stw r6, r3, 0x13C #Writing Your Y-Origin at G_Spawn + 0x13C
stw r7, r3, 0x140 #Writing Your Z-Origin at G_Spawn + 0x140
lwz r8, r4, 0x214 #Reading Your X-Angles and Storing it in r8
lwz r9, r4, 0x218 #Reading Your Y-Angles and Storing it in r9
lwz r10, r4, 0x21C #Reading Your Z-Angles and Storing it in r10
stw r8, r3, 0x144 #Writing Your X-Angles at G_Spawn + 0x144
stw r9, r3, 0x148 #Writing Your Y-Angles at G_Spawn + 0x148
stw r10, r3, 0x14C #Writing Your Z-Angles at G_Spawn + 0x14C
bl 0x001BCD10 #Calling G_Spawn
li r3, 0 #Value will be returned here
lis r4, 0x007F
addic r4, r4, 0x62B0 #Address where the model string is stored
bl 0x001BE3F0 #Calling G_SetModel
lis r5, 0x007F
addic r5, r5, 0x63C0 #Address where the turret type string is stored
bl 0x001C8820 #Calling G_SpawnTurret
b end
end:
blr
li r3, 0 #Client
li r4, 0x17 #DPAD_RIGHT
bl Key_IsDown #Sorry I don't have the address lmao
cmpwi r3, 0
beq 0xC0 #End of fps else go to start
bl 0x38EDE8 #Calling R_SetFrameFog (you can use a different address amd you should use a different one if you use rpc)
b 0xB8 #End of fps
stdu r1, -0x70(r1)
mflr r0
std r0, 0x70+arg_10(r1)
lis r2, TOC Address
addic r2, r2, TOC Address
li r3, 0 #Client
li r4, 0x17 #DPAD_RIGHT
bl Key_IsDown #Sorry I don't have the address lmao
cmpwi r3, 0
beq 0x08
bl 0x38EDE8
------------Branchs here
lis r2, 0x734BE8
addic r2, r2, 0x734BE8
ld r0, 0x70+arg_10(r1)
mtlr r0
addi r1, r1, 0x70
blr
At 0x38EDE8
stdu r1, -0x70(r1)
mflr r0
std r0, 0x70+arg_10(r1)
lis r3, 0x001B
addic r3, r3, 0xCD10 #0x001BCD10 (G_Spawn)
lis r4, 0x14E
addic r4, r4, 0x2200 #0x14E2200 (G_Client)
lwz r5, r4, 0x1C #Reading Your X Origin and Storing it in r5
lwz r6, r4, 0x20 #Reading Your Y Origin and Storing it in r6
lwz r7, r4, 0x24 #Reading Your Z Origin and Storing it in r7
stw r5, r3, 0x138 #Writing Your X-Origin at G_Spawn + 0x138
stw r6, r3, 0x13C #Writing Your Y-Origin at G_Spawn + 0x13C
stw r7, r3, 0x140 #Writing Your Z-Origin at G_Spawn + 0x140
lwz r8, r4, 0x214 #Reading Your X-Angles and Storing it in r8
lwz r9, r4, 0x218 #Reading Your Y-Angles and Storing it in r9
lwz r10, r4, 0x21C #Reading Your Z-Angles and Storing it in r10
stw r8, r3, 0x144 #Writing Your X-Angles at G_Spawn + 0x144
stw r9, r3, 0x148 #Writing Your Y-Angles at G_Spawn + 0x148
stw r10, r3, 0x14C #Writing Your Z-Angles at G_Spawn + 0x14C
bl 0x001BCD10 #Calling G_Spawn
li r3, 0 #Value will be returned here
lis r4, 0x007F
addic r4, r4, 0x62B0 #Address where the model string is stored
bl 0x001BE3F0 #Calling G_SetModel
lis r5, 0x007F
addic r5, r5, 0x63C0 #Address where the turret type string is stored
bl 0x001C8820 #Calling G_SpawnTurret
ld r0, 0x70+arg_10(r1)
mtlr r0
addi r1, r1, 0x70
blr
stdu r1, -0x70(r1)
mflr r0
std r0, 0x70+arg_10(r1)
lis r2, TOC Address
addic r2, r2, TOC Address
li r3, 0 #Client
li r4, 0x17 #DPAD_RIGHT
bl Key_IsDown #Sorry I don't have the address lmao
cmpwi r3, 0
beq 0x08
bl 0x38EDE8
------------Branchs here
lis r2, 0x734BE8
addic r2, r2, 0x734BE8
ld r0, 0x70+arg_10(r1)
mtlr r0
addi r1, r1, 0x70
blr
At 0x38EDE8
stdu r1, -0x70(r1)
mflr r0
std r0, 0x70+arg_10(r1)
lis r3, 0x001B
addic r3, r3, 0xCD10 #0x001BCD10 (G_Spawn)
lis r4, 0x14E
addic r4, r4, 0x2200 #0x14E2200 (G_Client)
lwz r5, r4, 0x1C #Reading Your X Origin and Storing it in r5
lwz r6, r4, 0x20 #Reading Your Y Origin and Storing it in r6
lwz r7, r4, 0x24 #Reading Your Z Origin and Storing it in r7
stw r5, r3, 0x138 #Writing Your X-Origin at G_Spawn + 0x138
stw r6, r3, 0x13C #Writing Your Y-Origin at G_Spawn + 0x13C
stw r7, r3, 0x140 #Writing Your Z-Origin at G_Spawn + 0x140
lwz r8, r4, 0x214 #Reading Your X-Angles and Storing it in r8
lwz r9, r4, 0x218 #Reading Your Y-Angles and Storing it in r9
lwz r10, r4, 0x21C #Reading Your Z-Angles and Storing it in r10
stw r8, r3, 0x144 #Writing Your X-Angles at G_Spawn + 0x144
stw r9, r3, 0x148 #Writing Your Y-Angles at G_Spawn + 0x148
stw r10, r3, 0x14C #Writing Your Z-Angles at G_Spawn + 0x14C
bl 0x001BCD10 #Calling G_Spawn
li r3, 0 #Value will be returned here
lis r4, 0x007F
addic r4, r4, 0x62B0 #Address where the model string is stored
bl 0x001BE3F0 #Calling G_SetModel
lis r5, 0x007F
addic r5, r5, 0x63C0 #Address where the turret type string is stored
bl 0x001C8820 #Calling G_SpawnTurret
ld r0, 0x70+arg_10(r1)
mtlr r0
addi r1, r1, 0x70
blr
stdu r1, -0x70(r1)
mflr r0
std r0, 0x70+arg_10(r1)
lis r2, TOC Address
addic r2, r2, TOC Address
li r3, 0 #Client
li r4, 0x17 #DPAD_RIGHT
bl Key_IsDown #Sorry I don't have the address lmao
cmpwi r3, 0
beq 0x08
bl 0x38EDE8
------------Branchs here
lis r2, 0x734BE8
addic r2, r2, 0x734BE8
ld r0, 0x70+arg_10(r1)
mtlr r0
addi r1, r1, 0x70
blr
At 0x38EDE8
stdu r1, -0x70(r1)
mflr r0
std r0, 0x70+arg_10(r1)
lis r3, 0x001B
addic r3, r3, 0xCD10 #0x001BCD10 (G_Spawn)
lis r4, 0x14E
addic r4, r4, 0x2200 #0x14E2200 (G_Client)
lwz r5, r4, 0x1C #Reading Your X Origin and Storing it in r5
lwz r6, r4, 0x20 #Reading Your Y Origin and Storing it in r6
lwz r7, r4, 0x24 #Reading Your Z Origin and Storing it in r7
stw r5, r3, 0x138 #Writing Your X-Origin at G_Spawn + 0x138
stw r6, r3, 0x13C #Writing Your Y-Origin at G_Spawn + 0x13C
stw r7, r3, 0x140 #Writing Your Z-Origin at G_Spawn + 0x140
lwz r8, r4, 0x214 #Reading Your X-Angles and Storing it in r8
lwz r9, r4, 0x218 #Reading Your Y-Angles and Storing it in r9
lwz r10, r4, 0x21C #Reading Your Z-Angles and Storing it in r10
stw r8, r3, 0x144 #Writing Your X-Angles at G_Spawn + 0x144
stw r9, r3, 0x148 #Writing Your Y-Angles at G_Spawn + 0x148
stw r10, r3, 0x14C #Writing Your Z-Angles at G_Spawn + 0x14C
bl 0x001BCD10 #Calling G_Spawn
li r3, 0 #Value will be returned here
lis r4, 0x007F
addic r4, r4, 0x62B0 #Address where the model string is stored
bl 0x001BE3F0 #Calling G_SetModel
lis r5, 0x007F
addic r5, r5, 0x63C0 #Address where the turret type string is stored
bl 0x001C8820 #Calling G_SpawnTurret
ld r0, 0x70+arg_10(r1)
mtlr r0
addi r1, r1, 0x70
blr
int spawnTurret(int ent)
{
__asm
{
; lrn2commentinppc
mr r31, r3 ; So we don't lose the data inside ent
bl G_Spawn
lfs f1, 0x18(r31) ;
lfs f2, 0x1C(r31) ; Storing the player entities origin
lfs f3, 0x20(r31) ; ~
lfs f4, 0x3C(r31) ;
lfs f5, 0x40(r31) ; Storing the player entities angles
lfs f6, 0x44(r31) ; ~
stfs f1, 0x138(r3) ;
stfs f2, 0x13C(r3) ; Setting the spawned entities origin
stfs f3, 0x140(r3) ; ~
stfs f4, 0x144(r3) ;
stfs f5, 0x148(r3) ;
stfs f6, 0x14C(r3) ; Setting the spawned entities angles
mr r28, r3 ; So we don't lose the data returned from G_Spawn
lis r3, 0x007F@h
ori r3, r3, 0x62B0@l
bl G_ModelIndex ; Getting the model index
sth r3, 0x168(r2
; Setting the model
mr r3, r28
lis r4, 0x007F@h
addi r4, r4, 0x63C0@l
bl G_SpawnTurret ; cod4 it only has 2 params, possibily could have changed since then
blr ; Returning the spawned turret, stopping the function from further more continuing.
}
}
int spawnTurret(int ent)
{
__asm
{
; lrn2commentinppc
mr r31, r3 ; So we don't lose the data inside ent
bl G_Spawn
lfs f1, 0x18(r31) ;
lfs f2, 0x1C(r31) ; Storing the player entities origin
lfs f3, 0x20(r31) ; ~
lfs f4, 0x3C(r31) ;
lfs f5, 0x40(r31) ; Storing the player entities angles
lfs f6, 0x44(r31) ; ~
stfs f1, 0x138(r3) ;
stfs f2, 0x13C(r3) ; Setting the spawned entities origin
stfs f3, 0x140(r3) ; ~
stfs f4, 0x144(r3) ;
stfs f5, 0x148(r3) ;
stfs f6, 0x14C(r3) ; Setting the spawned entities angles
mr r28, r3 ; So we don't lose the data returned from G_Spawn
lis r3, 0x007F@h
ori r3, r3, 0x62B0@l
bl G_ModelIndex ; Getting the model index
sth r3, 0x168(r2
; Setting the model
mr r3, r28
lis r4, 0x007F@h
addi r4, r4, 0x63C0@l
bl G_SpawnTurret ; cod4 it only has 2 params, possibily could have changed since then
blr ; Returning the spawned turret, stopping the function from further more continuing.
}
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.