Raised This Month: $51 Target: $400
 12% 

Solved Betting system to database


Post New Thread Reply   
 
Thread Tools Display Modes
AmXDusT
Member
Join Date: Feb 2019
Location: Italy / Albania
Old 12-30-2019 , 16:12   Re: Betting system to database
Reply With Quote #11

Quote:
Originally Posted by 4ever16 View Post
Thanks will try this out!

One small thing i forgott.

At round end server prints to players who bet.

YOU WON the BET.
YOU LOST the BET.
Okay, I edited my previous post, now it should show. Let me know if there's any problem with it
AmXDusT is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-31-2019 , 00:21   Re: Betting system to database
Reply With Quote #12

Works great. Thanks!
4ever16 is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 01-06-2020 , 18:49   Re: Betting system to database
Reply With Quote #13

AmXDusT, can you also add so it prints nickname in database?
4ever16 is offline
AmXDusT
Member
Join Date: Feb 2019
Location: Italy / Albania
Old 01-07-2020 , 08:41   Re: Betting system to database
Reply With Quote #14

Quote:
Originally Posted by 4ever16 View Post
AmXDusT, can you also add so it prints nickname in database?
edited my previous post with the updated request.

You should delete the table:
Code:
 
DROP TABLE `db_bets`;
If you don't want to remove the entries you might have, execute this query:
Code:
ALTER TABLE `db_bets` ADD `player_nick` VARCHAR(32) NOT NULL AFTER `id`;
But the entries you'll already have won't have nick (unless you use the UPDATE_NICK), you'd have to add them manually for each one.

The plugin will save player's nick on the first bet he does. if he does other bets with different nicks, database won't be updated.
if you want it to be updated on every bet players make, uncomment the "#define UPDATE_NICK" on top.
AmXDusT is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-07-2020 , 08:50   Re: Betting system to database
Reply With Quote #15

Good job @AmXDusT ! Just one question: is SQL_QuoteString( Empty_Handle, ... ) the best way of escaping string while working with sql?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 01-07-2020 , 09:25   Re: Betting system to database
Reply With Quote #16

It only prints 2 letters in database from nick.
If my nickname is Player it only prints Pl in database.

Also no matter how i bet it allways shows and prints that i LOST.

Last edited by 4ever16; 01-07-2020 at 09:46.
4ever16 is offline
AmXDusT
Member
Join Date: Feb 2019
Location: Italy / Albania
Old 01-08-2020 , 18:17   Re: Betting system to database
Reply With Quote #17

Quote:
Originally Posted by 4ever16 View Post
It only prints 2 letters in database from nick.
If my nickname is Player it only prints Pl in database.

Also no matter how i bet it allways shows and prints that i LOST.
Forgot to edit hSaveTeamBet's size. Should be working fine now!
AmXDusT is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode