SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 28/09/2012, 07:15 AM   #1
HardBoy
Big Clucker
 
Join Date: Sep 2012
Posts: 72
Reputation: 5
Default when server restarts ....

hey,

How to make when the server restart it saves the players stats? because its only saving when the player disconnects, so if server restart the player stats won't save, i want it to save when server restart

PHP Code:
public OnPlayerDisconnect(playeridreason)
{
    
    new 
INI:File INI_Open(UserPath(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    
INI_WriteInt(File,"Admin",SInfo[playerid][pAdmin]);
    
INI_Close(File);

i have more but i won't write them all
HardBoy is offline   Reply With Quote
Old 28/09/2012, 07:18 AM   #2
XtremeR
Gangsta
 
XtremeR's Avatar
 
Join Date: Aug 2012
Location: Australia
Posts: 867
Reputation: 565
Default Re: when server restarts ....

if Y_ini fails then u better learn it, its not that easy to use.. i'd suggest u to use Dini instead, its easier
__________________
XtremeR is offline   Reply With Quote
Old 28/09/2012, 07:29 AM   #3
HardBoy
Big Clucker
 
Join Date: Sep 2012
Posts: 72
Reputation: 5
Default Re: when server restarts ....

dude my quistion is clear
i asked how to make when server restart stats saves?

or just give me for ex
puplic OnServerRestart For Example

give me anything that says about server restart and ill make stats saves
HardBoy is offline   Reply With Quote
Old 28/09/2012, 08:01 AM   #4
HardBoy
Big Clucker
 
Join Date: Sep 2012
Posts: 72
Reputation: 5
Default Re: when server restarts ....

omg any help?
HardBoy 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
Server Restarts 98rp Client Support 1 13/12/2011 09:00 AM
Server restarts... Edvin Scripting Help 5 08/12/2011 03:06 PM
Server restarts Marshell Server Support 16 01/06/2011 10:04 PM
Server restarts [DDC]Delight Server Support 0 31/10/2010 11:22 AM
Server always restarts :S _Ben_[Fux-c.co.il RP] Help Archive 4 03/10/2009 10:39 PM


All times are GMT. The time now is 04:37 PM.


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