Help in speed boast + sscanf help + float help -
AleemIqbal1 - 01.08.2015
Hello i am Making Speed boast script with float speed
this is my code
new amount;
if ( sscanf( params, "g", amount ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "{15D4ED}INFO {FFE4C4}You can also use /sb <1.0 - 1.4> to set your custom speedBoost." );
SendClientMessage( playerid, 0x33AA33AA,"{FF0000}xSF {7A7A7A}»{DBED15} {BABABA}You have {3BBD44}enabled {BABABA}speedboosting." );
SendClientMessage( playerid, 0x33AA33AA,"{15D4ED}INFO: {FFE4C4}Press the FIRE KEY while in a vehicle to activate it" );
Speedvalue[playerid] = amount;
format(gsQuery,sizeof(gsQuery),"UPDATE `accounts` SET `Speedvalue` = '%0.2f' WHERE `Key` = '%d'",Speedvalue[playerid],PlayerInfo[ playerid ][ AccID ]);
mysql_query( gsQuery, THREAD_NONE, playerid );
but its not working when i type command game crashes and texture gets bugged .i think the bug is in sscanf
i will +rep if you will help me
Re: Help in speed boast + sscanf help + float help -
[XST]O_x - 01.08.2015
Well, amount should be a float.
pawn Код:
new Float: amount;
//Speedvalue[playerid] should also be defined as a Float
And I'm not sure which version of MySQL you're using, but I'm pretty sure 'format' should be 'mysql_format':
pawn Код:
mysql_format(handleid, gsQuery, sizeof gsQuery, "UPDATE `accounts` SET `Speedvalue` = %f WHERE `Key` = %d",Speedvalue[playerid],PlayerInfo[ playerid ][ AccID ]);
mysql_query(handleid, gsQuery);
Re: Help in speed boast + sscanf help + float help -
AleemIqbal1 - 02.08.2015
thats not the error
i have already dont thaat
Re: Help in speed boast + sscanf help + float help -
CraTzy - 29.08.2015
show up when key pressed , and use [PAWN] [ /PAWN] remove space between the / and [