Post: Using methods
08-29-2016, 01:51 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); So basically im trying to make a stealth mod for personal use and I am having troubles testing getting the buttons to work.

in the init(), onPlayerConnect(), and onPlayerSpawned() method I tried adding
self/player/level thread controls();
thinking it will keep the method running.

    
controls()
{
for(;Winky Winky
{
if(self sprintbuttonpressed()) self iprintln("SPRINT");
if(self inventorybuttonpressed()) self iprintln("INVENTORY");
if(self secondaryoffhandbuttonpressed()) self iprintln("[{+smoke}]");
if(self fragbuttonpressed()) self iprintln("[{+frag}]");
if(self stancebuttonpressed()) self iprintln("[{+stance}]");
if(self jumpbuttonpressed()) self iprintln("[{+gostand}]");
if(self meleebuttonpressed()) self iprintln("[{+melee}]");
if(self adsbuttonpressed()) self iprintln("[{+speed_throw}]");
if(self actionslotfourbuttonpressed()) self iprintln("[{+actionslot 4}]");
if(self actionslotthreebuttonpressed()) self iprintln("[{+actionslot 3}]");
if(self actionslottwobuttonpressed()) self iprintln("[{+actionslot 2}]");
if(self actionslotonebuttonpressed()) self iprintln("[{+actionslot 1}]");
if(self attackbuttonpressed()) self iprintln("[{+attack}]");
if(self changeseatbuttonpressed()) self iprintln("[{+switchseat}]");
if(self usebuttonpressed()) self iprintln("[{+usereload}]");
}
}


I have tried with and without the for loop. Im trying to see which one is which button because what I want is
if(self crouch + leftdpad) do this



Also, is self iprintln(); display to the entire lobby or only to the person that activated the couch and dpadleft?
08-29-2016, 04:15 AM #2
itsSorrow
In my man cave
Originally posted by iAmRishi View Post
So basically im trying to make a stealth mod for personal use and I am having troubles testing getting the buttons to work.

in the init(), onPlayerConnect(), and onPlayerSpawned() method I tried adding
self/player/level thread controls();
thinking it will keep the method running.

    
controls()
{
for(;Winky Winky
{
if(self sprintbuttonpressed()) self iprintln("SPRINT");
if(self inventorybuttonpressed()) self iprintln("INVENTORY");
if(self secondaryoffhandbuttonpressed()) self iprintln("[{+smoke}]");
if(self fragbuttonpressed()) self iprintln("[{+frag}]");
if(self stancebuttonpressed()) self iprintln("[{+stance}]");
if(self jumpbuttonpressed()) self iprintln("[{+gostand}]");
if(self meleebuttonpressed()) self iprintln("[{+melee}]");
if(self adsbuttonpressed()) self iprintln("[{+speed_throw}]");
if(self actionslotfourbuttonpressed()) self iprintln("[{+actionslot 4}]");
if(self actionslotthreebuttonpressed()) self iprintln("[{+actionslot 3}]");
if(self actionslottwobuttonpressed()) self iprintln("[{+actionslot 2}]");
if(self actionslotonebuttonpressed()) self iprintln("[{+actionslot 1}]");
if(self attackbuttonpressed()) self iprintln("[{+attack}]");
if(self changeseatbuttonpressed()) self iprintln("[{+switchseat}]");
if(self usebuttonpressed()) self iprintln("[{+usereload}]");
}
}


I have tried with and without the for loop. Im trying to see which one is which button because what I want is
if(self crouch + leftdpad) do this



Also, is self iprintln(); display to the entire lobby or only to the person that activated the couch and dpadleft?


u need the for loop and a wait
08-29-2016, 04:23 AM #3
itsSorrow
In my man cave
Originally posted by iAmRishi View Post
So basically im trying to make a stealth mod for personal use and I am having troubles testing getting the buttons to work.

in the init(), onPlayerConnect(), and onPlayerSpawned() method I tried adding
self/player/level thread controls();
thinking it will keep the method running.

    
controls()
{
for(;Winky Winky
{
if(self sprintbuttonpressed()) self iprintln("SPRINT");
if(self inventorybuttonpressed()) self iprintln("INVENTORY");
if(self secondaryoffhandbuttonpressed()) self iprintln("[{+smoke}]");
if(self fragbuttonpressed()) self iprintln("[{+frag}]");
if(self stancebuttonpressed()) self iprintln("[{+stance}]");
if(self jumpbuttonpressed()) self iprintln("[{+gostand}]");
if(self meleebuttonpressed()) self iprintln("[{+melee}]");
if(self adsbuttonpressed()) self iprintln("[{+speed_throw}]");
if(self actionslotfourbuttonpressed()) self iprintln("[{+actionslot 4}]");
if(self actionslotthreebuttonpressed()) self iprintln("[{+actionslot 3}]");
if(self actionslottwobuttonpressed()) self iprintln("[{+actionslot 2}]");
if(self actionslotonebuttonpressed()) self iprintln("[{+actionslot 1}]");
if(self attackbuttonpressed()) self iprintln("[{+attack}]");
if(self changeseatbuttonpressed()) self iprintln("[{+switchseat}]");
if(self usebuttonpressed()) self iprintln("[{+usereload}]");
}
}


I have tried with and without the for loop. Im trying to see which one is which button because what I want is
if(self crouch + leftdpad) do this



Also, is self iprintln(); display to the entire lobby or only to the person that activated the couch and dpadleft?


Here

    
controls()
{
for(;Winky Winky
{
if(self sprintbuttonpressed()) self iprintln("SPRINT");
if(self inventorybuttonpressed()) self iprintln("INVENTORY");
if(self secondaryoffhandbuttonpressed()) self iprintln("[{+smoke}]");
if(self fragbuttonpressed()) self iprintln("[{+frag}]");
if(self stancebuttonpressed()) self iprintln("[{+stance}]");
if(self jumpbuttonpressed()) self iprintln("[{+gostand}]");
if(self meleebuttonpressed()) self iprintln("[{+melee}]");
if(self adsbuttonpressed()) self iprintln("[{+speed_throw}]");
if(self actionslotfourbuttonpressed()) self iprintln("[{+actionslot 4}]");
if(self actionslotthreebuttonpressed()) self iprintln("[{+actionslot 3}]");
if(self actionslottwobuttonpressed()) self iprintln("[{+actionslot 2}]");
if(self actionslotonebuttonpressed()) self iprintln("[{+actionslot 1}]");
if(self attackbuttonpressed()) self iprintln("[{+attack}]");
if(self changeseatbuttonpressed()) self iprintln("[{+switchseat}]");
if(self usebuttonpressed()) self iprintln("[{+activate}]");
}
wait 0.05;
}
08-29-2016, 05:19 AM #4
Kronos
Former Staff
Originally posted by iAmRishi View Post
So basically im trying to make a stealth mod for personal use and I am having troubles testing getting the buttons to work.

in the init(), onPlayerConnect(), and onPlayerSpawned() method I tried adding
self/player/level thread controls();
thinking it will keep the method running.

    
controls()
{
for(;Winky Winky
{
if(self sprintbuttonpressed()) self iprintln("SPRINT");
if(self inventorybuttonpressed()) self iprintln("INVENTORY");
if(self secondaryoffhandbuttonpressed()) self iprintln("[{+smoke}]");
if(self fragbuttonpressed()) self iprintln("[{+frag}]");
if(self stancebuttonpressed()) self iprintln("[{+stance}]");
if(self jumpbuttonpressed()) self iprintln("[{+gostand}]");
if(self meleebuttonpressed()) self iprintln("[{+melee}]");
if(self adsbuttonpressed()) self iprintln("[{+speed_throw}]");
if(self actionslotfourbuttonpressed()) self iprintln("[{+actionslot 4}]");
if(self actionslotthreebuttonpressed()) self iprintln("[{+actionslot 3}]");
if(self actionslottwobuttonpressed()) self iprintln("[{+actionslot 2}]");
if(self actionslotonebuttonpressed()) self iprintln("[{+actionslot 1}]");
if(self attackbuttonpressed()) self iprintln("[{+attack}]");
if(self changeseatbuttonpressed()) self iprintln("[{+switchseat}]");
if(self usebuttonpressed()) self iprintln("[{+usereload}]");
}
}


I have tried with and without the for loop. Im trying to see which one is which button because what I want is
if(self crouch + leftdpad) do this



Also, is self iprintln(); display to the entire lobby or only to the person that activated the couch and dpadleft?


Status on issue?
08-30-2016, 12:58 AM #5
Originally posted by Gentle View Post
Here

    
controls()
{
for(;Winky Winky
{
if(self sprintbuttonpressed()) self iprintln("SPRINT");
if(self inventorybuttonpressed()) self iprintln("INVENTORY");
if(self secondaryoffhandbuttonpressed()) self iprintln("[{+smoke}]");
if(self fragbuttonpressed()) self iprintln("[{+frag}]");
if(self stancebuttonpressed()) self iprintln("[{+stance}]");
if(self jumpbuttonpressed()) self iprintln("[{+gostand}]");
if(self meleebuttonpressed()) self iprintln("[{+melee}]");
if(self adsbuttonpressed()) self iprintln("[{+speed_throw}]");
if(self actionslotfourbuttonpressed()) self iprintln("[{+actionslot 4}]");
if(self actionslotthreebuttonpressed()) self iprintln("[{+actionslot 3}]");
if(self actionslottwobuttonpressed()) self iprintln("[{+actionslot 2}]");
if(self actionslotonebuttonpressed()) self iprintln("[{+actionslot 1}]");
if(self attackbuttonpressed()) self iprintln("[{+attack}]");
if(self changeseatbuttonpressed()) self iprintln("[{+switchseat}]");
if(self usebuttonpressed()) self iprintln("[{+activate}]");
}
wait 0.05;
}


It did not work do you have any other idea?
08-30-2016, 01:28 AM #6
Originally posted by Kronos View Post
Status on issue?


Unsolved.
08-30-2016, 02:59 AM #7
itsSorrow
In my man cave
Originally posted by iAmRishi View Post
It did not work do you have any other idea?


How r u calling it?
08-30-2016, 03:16 AM #8
Originally posted by Gentle View Post
How r u calling it?


self thread controls();
08-30-2016, 04:18 AM #9
itsSorrow
In my man cave
Originally posted by iAmRishi View Post
self thread controls();


then idk m8.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo