Raised This Month: $51 Target: $400
 12% 

Solved StartMessageAll Shake Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Swolly
Senior Member
Join Date: Jul 2018
Location: Turkey
Old 02-03-2019 , 08:42   StartMessageAll Shake Error
Reply With Quote #1

StartMessageAll Shake Error;

http://prntscr.com/mg0hoa

Last edited by Swolly; 02-03-2019 at 14:10.
Swolly is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 02-03-2019 , 09:11   Re: StartMessageAll Shake Error
Reply With Quote #2

Don't crop out the actual exception (the line saying "Exception reported"). That describes the actual problem you're experiencing.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Swolly
Senior Member
Join Date: Jul 2018
Location: Turkey
Old 02-03-2019 , 09:14   Re: StartMessageAll Shake Error
Reply With Quote #3

Quote:
Originally Posted by nosoop View Post
Don't crop out the actual exception (the line saying "Exception reported"). That describes the actual problem you're experiencing.
I using this:
Code:
    Handle message = StartMessageAll("Shake"); 
		    
	BfWriteByte(message, 0);
	BfWriteFloat(message, 30.0);
	BfWriteFloat(message, 10.0);
	BfWriteFloat(message, 3.0);
	EndMessage();
Swolly is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-03-2019 , 09:53   Re: StartMessageAll Shake Error
Reply With Quote #4

Which game is this for? I ask because CS:GO uses Protocol Buffer usermessages instead of Bitbuffer usermessages.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-03-2019 at 10:01.
Powerlord is offline
Swolly
Senior Member
Join Date: Jul 2018
Location: Turkey
Old 02-03-2019 , 09:55   Re: StartMessageAll Shake Error
Reply With Quote #5

Quote:
Originally Posted by Powerlord View Post
Which game is this for? I ask because CS:GO uses Protocol Buffer usermessages instead of Bitbuffer usermessages.
Game is csgo, you can make for me?
Swolly is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-03-2019 , 10:01   Re: StartMessageAll Shake Error
Reply With Quote #6

In CS:GO, Shake should look something like this:

Code:
Handle message = StartMessageAll("Shake");
PbSetInt(message, "command", 0);
PbSetFloat(message, "local_amplitude", 30.0);
PbSetFloat(message, "frequency", 10.0);
PbSetFloat(message, "duration", 3.0);
EndMessage();
Edit: While we're on the subject, you can actually code for both at the same time for plugins that support multiple games:

Code:
Handle message = StartMessageAll("Shake");

if (GetUserMessageType() == UM_Protobuf) {
	PbSetInt(message, "command", 0);
	PbSetFloat(message, "local_amplitude", 30.0);
	PbSetFloat(message, "frequency", 10.0);
	PbSetFloat(message, "duration", 3.0);
} else {
	BfWriteByte(message, 0);
	BfWriteFloat(message, 30.0);
	BfWriteFloat(message, 10.0);
	BfWriteFloat(message, 3.0);
}

EndMessage();
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-03-2019 at 11:32.
Powerlord is offline
Swolly
Senior Member
Join Date: Jul 2018
Location: Turkey
Old 02-03-2019 , 12:02   Re: StartMessageAll Shake Error
Reply With Quote #7

Quote:
Originally Posted by Powerlord View Post
In CS:GO, Shake should look something like this:

Code:
Handle message = StartMessageAll("Shake");
PbSetInt(message, "command", 0);
PbSetFloat(message, "local_amplitude", 30.0);
PbSetFloat(message, "frequency", 10.0);
PbSetFloat(message, "duration", 3.0);
EndMessage();
Edit: While we're on the subject, you can actually code for both at the same time for plugins that support multiple games:

Code:
Handle message = StartMessageAll("Shake");

if (GetUserMessageType() == UM_Protobuf) {
	PbSetInt(message, "command", 0);
	PbSetFloat(message, "local_amplitude", 30.0);
	PbSetFloat(message, "frequency", 10.0);
	PbSetFloat(message, "duration", 3.0);
} else {
	BfWriteByte(message, 0);
	BfWriteFloat(message, 30.0);
	BfWriteFloat(message, 10.0);
	BfWriteFloat(message, 3.0);
}

EndMessage();
I how change this time, duration is not working
Swolly is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode