SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 13/02/2018, 02:29 PM   #1
PepsiCola23
Gangsta
 
Join Date: May 2015
Posts: 684
Reputation: 3
Default Gettime doesnt save in MYSQL

PHP Code:
                    PlayerData[playerid][TimeTruck] = gettime();
                    new 
str[128];
                    
mysql_format(SQLstr,128,"UPDATE `users` SET `TruckTime`='%d' WHERE `id` = '%d' LIMIT 1",PlayerData[playerid][TimeTruck],PlayerData[playerid][ID]);
                    
mysql_tquery(SQLstr""""); 
i want to save the gettime so a player can use a cmd every 6 hours.
this is the save code,but in the table it always says NULL-doesn`t change.
PepsiCola23 is offline   Reply With Quote
Old 13/02/2018, 02:40 PM   #2
FaLLenGirL
Huge Clucker
 
FaLLenGirL's Avatar
 
Join Date: Jan 2016
Location: Romania
Posts: 204
Reputation: 33
Default Re: Gettime doesnt save in MYSQL

Well in the table you must have something like this:
[ this is the way i save last time or something when i use gettime( ) ]
__________________
FaLLenGirL is offline   Reply With Quote
Old 13/02/2018, 03:37 PM   #3
PepsiCola23
Gangsta
 
Join Date: May 2015
Posts: 684
Reputation: 3
Default Re: Gettime doesnt save in MYSQL

i solved it,i misstyped timetruck with trucktime
PepsiCola23 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql doesnt wants to save accounts. ShadowMortar Scripting Help 18 10/08/2017 10:17 AM
MySql Doesnt Save... turkromeo Scripting Help 1 07/04/2017 12:21 PM
VIP DOESNT SAVE Alexica721 Scripting Help 2 05/10/2013 03:05 PM
why doesnt it save demonarn Scripting Help 19 13/01/2012 06:22 PM
mysql doesnt save aircombat Help Archive 1 30/12/2010 11:45 PM


All times are GMT. The time now is 09:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.