Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock
You last visited: Today at 16:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Warrock - Code Snippets

Discussion on Warrock - Code Snippets within the WarRock forum part of the Shooter category.

Closed Thread
 
Old 02/12/2013, 20:16   #691
 
elite*gold: 0
Join Date: Jul 2011
Posts: 5
Received Thanks: 0
Code:
struct cPlayer
{
char Speaker13[20];//0x102EC
float PosX;//0x10300
char Speaker14[4];//0x10304
float PosY;//0x10310
char Speaker15[4];//0x10314
float PosZ;//0x10308
}; //size = 0x010310 (66320)
struct CBase
{
cPlayer* pLocal;//0xA4FEB0
char unknown0 [1212644];//0xA4FEB4
cPlayer** pGlobal;//0xB77F98
};CBase* p_Player = (CBase*)Adr_PlayerPointer;
CBase* global = (CBase*)Adr_RemotePointer;

Code:
if (opk == 1){
			for(int i = 0; i < 32; i++) {
				cPlayer* pPlayerA = p_Player->pGlobal[i];
				//p_Player->pLocal->PosX = 0.0F;
				//p_Player->pLocal->PosY = 0.0F;
				//p_Player->pLocal->PosZ = 0.0F;
				p_Player->pGlobal[i]->PosX = 0.0F;
				p_Player->pGlobal[i]->PosY = 0.0F;
				p_Player->pGlobal[i]->PosZ = 0.0F;
								
			}
		}
Can someone, please tell me or explain to me why this is not working (and no, not nullptr since that wasnt what i did wrong)
the p_player->plocal->pos works fine, its pglobal that causes the crashing.
i don't have a bypass, might that be what is crashing it?
also, in OPK where does the unknown0 in Cbase come into play?

thanks in advance!
anythinga2 is offline  
Old 02/12/2013, 21:01   #692
 
Raz9r's Avatar
 
elite*gold: 297
Join Date: Dec 2010
Posts: 1,129
Received Thanks: 1,687
Quote:
Originally Posted by anythinga2 View Post
(...) its pglobal that causes the crashing.
Dereferencing something pointing to invalid memory causes undefined behavior as stated in the C++ Standard. You should better check your pointers before dereferencing them. Also, try to debug it first.
Raz9r is offline  
Old 02/13/2013, 08:03   #693
 
elite*gold: 0
Join Date: Jun 2009
Posts: 11
Received Thanks: 0
may i ask something? i have a no menu base and my question is about OPK Warrock.. i can distance myself to them.

the problem is, is it possible to make the player move? i mean the only thing that is stuck in one place are the enemies.

Hoping for your spare time Masters of the Forum. thanks
anarchi8888 is offline  
Old 02/13/2013, 09:32   #694
 
Raz9r's Avatar
 
elite*gold: 297
Join Date: Dec 2010
Posts: 1,129
Received Thanks: 1,687
By setting everyones location to (0, 0, 0) you freeze them at that position. If you do that for every player but yourself, you will still be able to move.

Pseudo-Code:
Code:
for (size_t i = 0; i < 32; ++i) {
  if (i != local_index) {
    do_opk();
  }
}
Raz9r is offline  
Thanks
3 Users
Old 02/13/2013, 20:22   #695
 
SonyRazzer's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 182
Received Thanks: 223
Kann mir einer vielleicht sagen, wo man nachlesen kann, wie man was in C++ bennent ?
Also damit meine ich jetzt z.B. ein LPSTR dann als szString oder lpString zu nennen.
SonyRazzer is offline  
Old 02/13/2013, 20:47   #696
 
NikM's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 972
Received Thanks: 1,583
Ich denke du meinst die Ungarische Notation.
sz = String Zero Terminated
lp = long pointer

Lässt sich hier Nachlesen:
NikM is offline  
Thanks
1 User
Old 02/13/2013, 20:53   #697



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,039
Received Thanks: 988
Das Präfix "sz" steht in der Hungarian notation für zero-terminated string (null-terminierte Zeichenkette) und "lp" für long pointer

Es ist jedem selbst überlassen welcher naming conventions man sich unterwirft.
+Yazzn is offline  
Thanks
1 User
Old 02/13/2013, 20:55   #698
 
elite*gold: 0
Join Date: Jul 2011
Posts: 5
Received Thanks: 0
okay, i got opk working, altough now i have a problem, it teleports everyone, and then keeps sending them back to their normal location, so it look likes an infinite loop, anyway you can freeze them?
anythinga2 is offline  
Old 02/13/2013, 21:42   #699
 
SonyRazzer's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 182
Received Thanks: 223
Quote:
Originally Posted by Yazzn (: View Post
Das Präfix "sz" steht in der Hungarian notation für zero-terminated string (null-terminierte Zeichenkette) und "lp" für long pointer

Es ist jedem selbst überlassen welcher naming conventions man sich unterwirft.
Danke, aber was ist z.B. mit lpszBlaBla
Das nutzt doch z.B. Microsoft ( MSDN .. )
SonyRazzer is offline  
Old 02/13/2013, 21:56   #700



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,039
Received Thanks: 988
Zu der Sache mit den long pointern:
Quote:
Historisch steht P für "pointer", während LP für "long pointer" steht. Lange Zeiger (auch weite Zeiger genannt) sind ein Überbleibsel aus 16-Bit-Windows, bei dem Sie dafür benötigt wurden, Speicherbereiche außerhalb des aktuellen Segments abzudecken. Das Präfix LP wurde beibehalten, um das Portieren von 16-Bit-Code in 32-Bit-Windows zu vereinfachen. Aktuell besteht hier kein Unterschied — ein Zeiger ist ein Zeiger.
+Yazzn is offline  
Thanks
1 User
Old 02/14/2013, 05:31   #701
 
elite*gold: 0
Join Date: Jun 2009
Posts: 11
Received Thanks: 0
Quote:
Originally Posted by anythinga2 View Post
okay, i got opk working, altough now i have a problem, it teleports everyone, and then keeps sending them back to their normal location, so it look likes an infinite loop, anyway you can freeze them?
out of the topic question Sir. I just want to ask if you can move? and the only thing that is stuck are the other players not you?

thanks
anarchi8888 is offline  
Old 02/14/2013, 10:41   #702
 
boknoy24's Avatar
 
elite*gold: 0
Join Date: Nov 2007
Posts: 119
Received Thanks: 45
anyone have a source here. you can move on opk only the enemies are in the 0 position. or a save position then when you saved it. the enemies are in there .
boknoy24 is offline  
Old 02/14/2013, 10:53   #703
 
elite*gold: 0
Join Date: Jun 2009
Posts: 11
Received Thanks: 0
thank you for the reply but i cant seem to figure out still..


Quote:
Originally Posted by boknoy24 View Post
anyone have source like this? OPK that you can walk only the other players are in the position.

Exactly what im asking....
anarchi8888 is offline  
Old 02/14/2013, 11:23   #704
 
boknoy24's Avatar
 
elite*gold: 0
Join Date: Nov 2007
Posts: 119
Received Thanks: 45
Quote:
Originally Posted by anarchi8888 View Post
thank you for the reply but i cant seem to figure out still..




Exactly what im asking....

yeah this one i need it to :/
boknoy24 is offline  
Old 02/14/2013, 11:29   #705
 
elite*gold: 0
Join Date: Aug 2011
Posts: 726
Received Thanks: 3,211
Quote:
Originally Posted by anarchi8888 View Post
thank you for the reply but i cant seem to figure out still..




Exactly what im asking....
Quote:
Originally Posted by boknoy24 View Post
yeah this one i need it to :/

Seriously ?

Go back old old page and read what UnderSc.. said , just loop all player only u by doing if(Index != MyIndex)
R3d_L!n3 is offline  
Thanks
2 Users
Closed Thread


Similar Threads Similar Threads
WarRock EU - Code Snippets
07/12/2012 - WarRock - 7490 Replies
Hi Leute, in diesem Thread könnt ihr: -> Nach Sourcecodes fragen(Beispiel unten) -> Eure Sourcecodes posten(Wenn sie nicht von euch sind mit Credits!) -> Fragen ob eure Source evtl. einen Fehler hat -> Fragen was welcher Fehler bedeuted -> Sourcecodes entnehmen(Bitte beim Release dann Credits angeben!)



All times are GMT +2. The time now is 16:10.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.