who can add in this script Mouse Sensetivity on the fly
3 posts
• Page 1 of 1
who can add in this script Mouse Sensetivity on the fly
I Need Help i wannt to a adjust the sensetivity when i am in the game on the fly
if i Press A Keybord Buton Like + or Other
for hip Script
and Hip and ads
No one want help ?
if i Press A Keybord Buton Like + or Other
for hip Script
and Hip and ads
No one want help ?
- Code: Select all
// INCLUDES ====================================================================
#include <keyboard.gph>
#include <mouse.gph>
// INITIALIZATION ==============================================================
init{
keymapping();
mousemapping();
}
// MAIN SCRIPT =================================================================
main {
key_passthru();
mouse_passthru();
if(mouse_status(MREPORT_UPDATED)) {
mouse_set(MOUSE_X, (int32)((fix32)mouse_status(MOUSE_X) / 95.09));
mouse_set(MOUSE_Y, (int32)((fix32)mouse_status(MOUSE_Y) / 94.09));
}
}
- Code: Select all
#pragma METAINFO("Mouse Sens ADS", 1, 0, "teddy18")
// INCLUDES ====================================================================
#include <keyboard.gph>
#include <mouse.gph>
// INITIALIZATION ==============================================================
init{
keymapping();
mousemapping();
}
// MAIN SCRIPT =================================================================
main {
key_passthru();
mouse_passthru();
if(mouse_status(MREPORT_UPDATED)) {
if(key_status(MBUTTON_2)) {
fix32 mx = (fix32) mouse_status(MOUSE_X);
fix32 my = (fix32) mouse_status(MOUSE_Y);
mouse_set(MOUSE_X, (int32) (mx / 93.17));
mouse_set(MOUSE_Y, (int32) (my / 91.11));
}
else{
mouse_set(MOUSE_X, (int32)((fix32)mouse_status(MOUSE_X) / 95.09));
mouse_set(MOUSE_Y, (int32)((fix32)mouse_status(MOUSE_Y) / 94.09));
}
}
}
-
teddy18 - Lieutenant
- Posts: 346
- Joined: Sun Jul 19, 2015 4:18 pm
Re: who can add in this script Mouse Sensetivity on the fly
No body can help how have to do it ?
-
teddy18 - Lieutenant
- Posts: 346
- Joined: Sun Jul 19, 2015 4:18 pm
Re: who can add in this script Mouse Sensetivity on the fly
This should help you with getting the basic function working first: viewtopic.php?f=26&t=15326&p=98529&hilit=pc+sensitivity#p98506
Then you just need to read the key status and alter the values on you key press, so you need to change the defines to variables in order to be able to alter them.
"key_events" from the online resource should help you with detecting the event_active alike for a key press.
Then you just need to read the key status and alter the values on you key press, so you need to change the defines to variables in order to be able to alter them.
"key_events" from the online resource should help you with detecting the event_active alike for a key press.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
3 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 203 guests