I need a idea to make bind keys cheat codes
example player types panzer ( not in chat ), it spawns a tank near him
how?
I do not want to spam this, But I would create a bool, Vip = true/false;
create a command first to set vip to true, Then your bind-keys are possibly enabled upon the bool.
Maybe vip is purchasable, I am not familiar with vcmp bindkeys if so I would script this for you.
keys <- [];
keypress <- array( 100, "" );
function onScriptLoad(){
keys.push([ "P", BindKey.. ]);
//Array: Key, BindKey function
//Keys sequence:- p a n z e r
}
function onKeyDown( player, key ){
foreach( idx, val in keys ){
if( val == key ) keypress[ player.ID ] += idx;
}
if( keypress[ player.ID ] == "PANZER" ) Spawn_A_Tank();
}
Untested, but should give you an idea.
That snippet is nice, but it wouldn't work a second time, or even when you type ppanzer.
I would also record the time of the first keypress, and limiting the last to be within a certain time.
If you do another keypress that's to long ago from the first, you reset your pressed keys.
there are two ways u can do it either on player chat or bindkeys Example:- function onKeyDown(player,key)
{
if( key == PAN )
{
CreateVehicle( 162, player.World, player.Pos, player.Angle, 1, 1);
}
}
function onScriptLoad()
{
dofile( "Scripts/Functions.nut" );
PAN <- BindKey(true,0x50,0x41,0x4E);
}
& onplayerchat
if ( text == "car")
{
Message("["+ player.Name + "] got a cheat command!");
CreateVehicle( 163, player.World, player.Pos, player.Angle, 1, 1);
}
;) Haven't tested but u may get an idea!
Quote from: MEGAMIND on Aug 07, 2017, 09:47 AMthere are two ways u can do it either on player chat or bindkeys Example:- function onKeyDown(player,key)
{
if( key == PAN )
{
CreateVehicle( 162, player.World, player.Pos, player.Angle, 1, 1);
}
}
function onScriptLoad()
{
dofile( "Scripts/Functions.nut" );
PAN <- BindKey(true,0x50,0x41,0x4E);
}
& onplayerchat
if ( text == "car")
{
Message("["+ player.Name + "] got a cheat command!");
CreateVehicle( 163, player.World, player.Pos, player.Angle, 1, 1);
}
;) Haven't tested but u may get an idea!
is it necessary to bump old topics? you may thank vcmp staff they are not banning anyone for bump but dont do this
last reply
Reply #3, 9 months ago »
Quote from: Cool on Aug 07, 2017, 09:52 AMQuote from: MEGAMIND on Aug 07, 2017, 09:47 AMthere are two ways u can do it either on player chat or bindkeys Example:- function onKeyDown(player,key)
{
if( key == PAN )
{
CreateVehicle( 162, player.World, player.Pos, player.Angle, 1, 1);
}
}
function onScriptLoad()
{
dofile( "Scripts/Functions.nut" );
PAN <- BindKey(true,0x50,0x41,0x4E);
}
& onplayerchat
if ( text == "car")
{
Message("["+ player.Name + "] got a cheat command!");
CreateVehicle( 163, player.World, player.Pos, player.Angle, 1, 1);
}
;) Haven't tested but u may get an idea!
is it necessary to bump old topics? you may thank vcmp staff they are not banning anyone for bump but dont do this
last reply
Reply #3, 9 months ago »
i helped that guy u should be aware of getting banned stop increasing your posts with foolish posts
and its not a bump idiot some other may get help from this topic!
and one more thing for a idiot like u if kewun is banned so what if someone else came roaming bye for same topic with cheatcodes so he can get a help from here....and dont reply with ur idiotic answers i dont have time to create a war with u remmeber u were once newbie to if u cant help dont disturb other's
I am saying Dont Bumpppppppp Old topics stupid its against rules you can ask from anyone
Wth? That's not how BindKey works. You aren't helping anyone here.
@EK.IceFlake u may try if doesnt works tell me it works fr me
@Cool if bumping an old topic help others so its not a bump!
Quote from: MEGAMIND on Aug 07, 2017, 10:26 AM@Cool if bumping an old topic help others so its not a bump!
he is banned and the topic is 9 months old so no need to reply if you think its usefull for others then please create new thread
we got a new kewun :P
Quote from: Cool on Aug 07, 2017, 10:28 AMQuote from: MEGAMIND on Aug 07, 2017, 10:26 AM@Cool if bumping an old topic help others so its not a bump!
he is banned and the topic is 9 months old so no need to reply if you think its usefull for others then please create new threads
we got a new kewun :P
lol ok so y didnt u said that before why u created a mess though
and dont call say that K**** again
i thought there is a thing common sense but sadly i was a fool its not that common
Quote from: Cool on Aug 07, 2017, 10:34 AMi thought there is a thing common sense but sadly i was a fool its not that common
HUH "Whatever"....
Last reply 9 months ago, latest reply today, IFYWIM :P
Quote from: Xmair on Aug 07, 2017, 06:12 PMLast reply 9 months ago, latest reply today, IFYWIM :P
All it takes is one mistake :D