Is it a bug or am I using it wrong?
function onScriptLoad()
{
SetDrivebyEnabled( false );
print( "What is the answer? R: " + GetDrivebyEnabled() );
}
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs30.postimg.org%2Fo5m3ugrrl%2FSem_t_tulo.png&hash=05db2b32e6978474a52dde67cfc9fcbce71d0a2f)
I'm trying to create an admin command and this is reversed.
yea,
@Stormeus setting SetDrivebyEnabled(
false ); returns true and setting SetDrivebyEnabled(
true); returns false and sorry i haven't tested it before
So I have to use so even or an update will be made to correct this error?
Quote from: Lavador on Mar 31, 2016, 11:07 PMSo I have to use so even or an update will be made to correct this error?
Make another temporary function for now. I don't think that the devs really have time to fix this small error :P
Or copy the function from here:
function SetDrivebyEnabled( bool ){
switch( bool ){
case true: return ::SetDrivebyEnabled( false );
case false: return ::SetDrivebyEnabled( true );
}
}
Untested :D
You don't even need the switch statement. The problem is with GetDrivebyEnabled() not SetDrivebyEnabled.
getDrivebyEnabled <- GetDrivebyEnabled;
GetDrivebyEnabled <- function() {
if( getDrivebyEnabled() ) return false;
else return true;
}
This was an issue in the Squirrel plugin, which has been fixed in source, since it treated the function as if it were "GetDrivebyDisabled". I'll push fixed builds later this evening.
https://bitbucket.org/stormeus/0.4-squirrel/commits/43456fd5de04aa3a2e970c89938c790540c90c42
Quote from: [R*] Stormeus on Apr 01, 2016, 01:22 PMThis was an issue in the Squirrel plugin, which has been fixed in source, since it treated the function as if it were "GetDrivebyDisabled". I'll push fixed builds later this evening.
https://bitbucket.org/stormeus/0.4-squirrel/commits/43456fd5de04aa3a2e970c89938c790540c90c42
I have waited you check my pull request for near a month. :( Could you give me a reply?
Quote from: ysc3839 on Apr 01, 2016, 03:09 PMQuote from: [R*] Stormeus on Apr 01, 2016, 01:22 PMThis was an issue in the Squirrel plugin, which has been fixed in source, since it treated the function as if it were "GetDrivebyDisabled". I'll push fixed builds later this evening.
https://bitbucket.org/stormeus/0.4-squirrel/commits/43456fd5de04aa3a2e970c89938c790540c90c42
I have waited you check my pull request for near a month. :( Could you give me a reply?
I'll check it out ASAP.