1) You can't get a players ping via a function, as I know.
2) Custom functions won't be recognized by the console. What you can do though is make a function that reads the custom variable and set the other one manually, if you get what I mean
hi guys,
1.
can u tell me how to get player's ping (latency)
or Self ping.
2.
how can i make console commands
eg. when i costume command in the console say
changenextgame "mp_rust" "sd"
it should run my function in my mod
i.e.
changenextgame(nextmap, nexttype)
{
setDvar("sv_maprotation", "gametype " + nextmap + " map " + nexttype + " " + getDvar("sv_maprotation"));
}
Regards
1) You can't get a players ping via a function, as I know.
2) Custom functions won't be recognized by the console. What you can do though is make a function that reads the custom variable and set the other one manually, if you get what I mean
Boon Pek is right, it's not possible.
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
i thought it was like " + self.ping + "
If I Helped You, Plz Thanks.
It Would Help Alot
What Do You Do For A Living?
What's That?I Mostly Own Noobs With The AK-47 With Silencer
(Turns To Friend)
[img]https://www.danasof*****m/sig/asd248737.jpg[/img]HAHAHA Noob!!!!!!
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
1) there is not a function (in game func, ofc) to get a player's ping.
2) level.nextmap does indeed set a custom variable a global variable called nextmap
My minecraft launcher!
A full-featured, actively-developed windows-only Minecraft Launcher! It allows you to download older versions of minecraft.jar through the options menu, multi-username support, RAM allocation support, non-legit logins and more!
[img]https://i61.photobucke*****m/albums/h56/damwickid/pscs5.png[/img]
If I remember right, it has something with
setDvarIfUnitialized("", );
Can't really remember.
That'd work. Like... if this Dvar is not the same as previous setting, then change the next map rotation to this etc...Code:if( getDvar("varnamehere") == "value" ) { execute code; }
Last edited by Boon Pek; 01-20-2011 at 08:59 AM.
My minecraft launcher!
A full-featured, actively-developed windows-only Minecraft Launcher! It allows you to download older versions of minecraft.jar through the options menu, multi-username support, RAM allocation support, non-legit logins and more!
[img]https://i61.photobucke*****m/albums/h56/damwickid/pscs5.png[/img]
setDvarIfUnitialized("nextname", "");
self setDvarIfUnitialized("nextname", "");
Actuatly if i add any 1 these line to init() & try to load that mod i get error "Unknown command"
setDvarIfUnitialized isn't a function in MW2, which is why it does not work.
My minecraft launcher!
A full-featured, actively-developed windows-only Minecraft Launcher! It allows you to download older versions of minecraft.jar through the options menu, multi-username support, RAM allocation support, non-legit logins and more!
[img]https://i61.photobucke*****m/albums/h56/damwickid/pscs5.png[/img]
^
|
Wrong, just me that might say some wrong typos.
Heres an example
Code:newConsoleDvar() { SetDvarIfUninitialized( "thing", "none"); self endon ( "death" ); for(;;) { if(getdvar( "thing" ) == "the "none" value here"){ //code here } } }Add it to onPlayerSpawned, and then type in consoleCode:newConsoleDvar() { SetDvarIfUninitialized( "giveM9", "none"); self endon ( "death" ); for(;;) { if(getdvar( "giveM9" ) == "1"){ self giveWeapon("beretta_mp");} } } giveM9 1
Untested, but should most likely work
If it doesn't work, but doesn't give an error itself, try a devmap