You are viewing our Forum Archives. To view or take place in current topics click here.
#11. Posted:
UnknownC0der
  • New Member
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 wrote
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!


Sup XexGrizzly, hows your step moose doing?
#12. Posted:
DarkVoyageModding
  • New Member
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 wrote
DarkVoyageModding wrote
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!
Thats not kyza what are you on? -_-


Do u go on se7ensisn? if u dont then u dont no

EDIT : [ Register or Signin to view external links. ]
#13. Posted:
DarkVoyageModding
  • New Member
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 wrote
DarkVoyageModding wrote
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!


Sup XexGrizzly, hows your step moose doing?


Step Moose? lol what r u on bro? [ Register or Signin to view external links. ]
#14. Posted:
DarkVoyageModding
  • New Member
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 wrote
DarkVoyageModding wrote
UnknownC0der wrote
DarkVoyageModding wrote
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!


Sup XexGrizzly, hows your step moose doing?


Step Moose? lol what r u on bro? [ Register or Signin to view external links. ]
He is talking about your spazztistic sister


lol. Thats kinda mean if u ask me.. cause she is dead.
#15. Posted:
xChillest
  • Christmas!
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?
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.