You are viewing our Forum Archives. To view or take place in current topics click here.
#11. Posted:
Status: Offline
Joined: Aug 10, 201410Year Member
Posts: 21
Reputation Power: 1
Status: Offline
Joined: Aug 10, 201410Year Member
Posts: 21
Reputation Power: 1
DarkVoyageModding wroteUnknownC0der wrote
int BG_GetWeaponDef(int weapId)
{
return *(int*)(0x8255A320 + (weapId * 4));
}
int getWorldXModel(int weapId, int variant=0)
{
return *(int*)(BG_GetWeaponDef(weapId) + (0x1D0+(variant*4)));
}
char*getWeaponModel(char*weaponName, int variant=0)
{
return (char*)(getWorldXModel(G_GetWeaponIndexForName(weaponName), variant));
}
float distance(float*v1, float*v2)
{
return sqrt((v1[0]-v2[0])*(v1[0]-v2[0])+(v1[1]-v2[1])*(v1[1]-v2[1])+(v1[2]-v2[2])*(v1[2]-v2[2]));
}
int spawnWeapon(char*weaponName, float*origin)
{
int weap = G_Spawn();
*(short*)(weap + 0x172) = *(short*)(weap + 0x174) = 0x11E4;
for(int i = 0, f = 0; i < 3; i++, f += 4)
{
*(float*)(weap+(0x138+f)) = oriign[i];
}
*(short*)(weap + 0x168) = G_ModelIndex(getWeaponModel(weaponName));
sp_script_model(weap);
return weap;
}
Then you can just do a simple distance check between a players origin, and the weapons origin. Checking if distance is less than 50 is when the player is pretty much on top if not around a small radius of the location. Then you can simply give the weapon, give ammo for that weapon and then switch to the weapon. You could have add a boolean parameter for if you want to delete the weapon after it's been taken, You can just call G_FreeEntity since it has support for all types of entities.
oh look its Kyza on TTG now lol!
Sup XexGrizzly, hows your step moose doing?
- 0useful
- 0not useful
#12. Posted:
Status: Offline
Joined: Jul 17, 201410Year Member
Posts: 36
Reputation Power: 1
Status: Offline
Joined: Jul 17, 201410Year Member
Posts: 36
Reputation Power: 1
AnimeAMV wroteDarkVoyageModding wroteThats not kyza what are you on? -_-UnknownC0der wrote
int BG_GetWeaponDef(int weapId)
{
return *(int*)(0x8255A320 + (weapId * 4));
}
int getWorldXModel(int weapId, int variant=0)
{
return *(int*)(BG_GetWeaponDef(weapId) + (0x1D0+(variant*4)));
}
char*getWeaponModel(char*weaponName, int variant=0)
{
return (char*)(getWorldXModel(G_GetWeaponIndexForName(weaponName), variant));
}
float distance(float*v1, float*v2)
{
return sqrt((v1[0]-v2[0])*(v1[0]-v2[0])+(v1[1]-v2[1])*(v1[1]-v2[1])+(v1[2]-v2[2])*(v1[2]-v2[2]));
}
int spawnWeapon(char*weaponName, float*origin)
{
int weap = G_Spawn();
*(short*)(weap + 0x172) = *(short*)(weap + 0x174) = 0x11E4;
for(int i = 0, f = 0; i < 3; i++, f += 4)
{
*(float*)(weap+(0x138+f)) = oriign[i];
}
*(short*)(weap + 0x168) = G_ModelIndex(getWeaponModel(weaponName));
sp_script_model(weap);
return weap;
}
Then you can just do a simple distance check between a players origin, and the weapons origin. Checking if distance is less than 50 is when the player is pretty much on top if not around a small radius of the location. Then you can simply give the weapon, give ammo for that weapon and then switch to the weapon. You could have add a boolean parameter for if you want to delete the weapon after it's been taken, You can just call G_FreeEntity since it has support for all types of entities.
oh look its Kyza on TTG now lol!
Do u go on se7ensisn? if u dont then u dont no
EDIT : [ Register or Signin to view external links. ]
- 0useful
- 3not useful
#13. Posted:
Status: Offline
Joined: Jul 17, 201410Year Member
Posts: 36
Reputation Power: 1
Status: Offline
Joined: Jul 17, 201410Year Member
Posts: 36
Reputation Power: 1
UnknownC0der wroteDarkVoyageModding wroteUnknownC0der wrote
int BG_GetWeaponDef(int weapId)
{
return *(int*)(0x8255A320 + (weapId * 4));
}
int getWorldXModel(int weapId, int variant=0)
{
return *(int*)(BG_GetWeaponDef(weapId) + (0x1D0+(variant*4)));
}
char*getWeaponModel(char*weaponName, int variant=0)
{
return (char*)(getWorldXModel(G_GetWeaponIndexForName(weaponName), variant));
}
float distance(float*v1, float*v2)
{
return sqrt((v1[0]-v2[0])*(v1[0]-v2[0])+(v1[1]-v2[1])*(v1[1]-v2[1])+(v1[2]-v2[2])*(v1[2]-v2[2]));
}
int spawnWeapon(char*weaponName, float*origin)
{
int weap = G_Spawn();
*(short*)(weap + 0x172) = *(short*)(weap + 0x174) = 0x11E4;
for(int i = 0, f = 0; i < 3; i++, f += 4)
{
*(float*)(weap+(0x138+f)) = oriign[i];
}
*(short*)(weap + 0x168) = G_ModelIndex(getWeaponModel(weaponName));
sp_script_model(weap);
return weap;
}
Then you can just do a simple distance check between a players origin, and the weapons origin. Checking if distance is less than 50 is when the player is pretty much on top if not around a small radius of the location. Then you can simply give the weapon, give ammo for that weapon and then switch to the weapon. You could have add a boolean parameter for if you want to delete the weapon after it's been taken, You can just call G_FreeEntity since it has support for all types of entities.
oh look its Kyza on TTG now lol!
Sup XexGrizzly, hows your step moose doing?
Step Moose? lol what r u on bro? [ Register or Signin to view external links. ]
- 0useful
- 0not useful
#14. Posted:
Status: Offline
Joined: Jul 17, 201410Year Member
Posts: 36
Reputation Power: 1
Status: Offline
Joined: Jul 17, 201410Year Member
Posts: 36
Reputation Power: 1
AnimeAMV wroteDarkVoyageModding wroteHe is talking about your spazztistic sisterUnknownC0der wroteDarkVoyageModding wroteUnknownC0der wrote
int BG_GetWeaponDef(int weapId)
{
return *(int*)(0x8255A320 + (weapId * 4));
}
int getWorldXModel(int weapId, int variant=0)
{
return *(int*)(BG_GetWeaponDef(weapId) + (0x1D0+(variant*4)));
}
char*getWeaponModel(char*weaponName, int variant=0)
{
return (char*)(getWorldXModel(G_GetWeaponIndexForName(weaponName), variant));
}
float distance(float*v1, float*v2)
{
return sqrt((v1[0]-v2[0])*(v1[0]-v2[0])+(v1[1]-v2[1])*(v1[1]-v2[1])+(v1[2]-v2[2])*(v1[2]-v2[2]));
}
int spawnWeapon(char*weaponName, float*origin)
{
int weap = G_Spawn();
*(short*)(weap + 0x172) = *(short*)(weap + 0x174) = 0x11E4;
for(int i = 0, f = 0; i < 3; i++, f += 4)
{
*(float*)(weap+(0x138+f)) = oriign[i];
}
*(short*)(weap + 0x168) = G_ModelIndex(getWeaponModel(weaponName));
sp_script_model(weap);
return weap;
}
Then you can just do a simple distance check between a players origin, and the weapons origin. Checking if distance is less than 50 is when the player is pretty much on top if not around a small radius of the location. Then you can simply give the weapon, give ammo for that weapon and then switch to the weapon. You could have add a boolean parameter for if you want to delete the weapon after it's been taken, You can just call G_FreeEntity since it has support for all types of entities.
oh look its Kyza on TTG now lol!
Sup XexGrizzly, hows your step moose doing?
Step Moose? lol what r u on bro? [ Register or Signin to view external links. ]
lol. Thats kinda mean if u ask me.. cause she is dead.
- 1useful
- 0not useful
#15. Posted:
Status: Offline
Joined: Jul 30, 201212Year Member
Posts: 2,396
Reputation Power: 123
Status: Offline
Joined: Jul 30, 201212Year Member
Posts: 2,396
Reputation Power: 123
Why can't everyone just chill out? Bitwise helped out the community a lot more than nearly everyone else on this forum site. Why not show a little respect instead of trying to get him banned again?
- 1useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.