spawning a player
#3

Quote:
Originally Posted by TheDrx
Посмотреть сообщение
You have more options. You may set the Money from the moment where you create the INI file.



You need to keep in mind that if the player is going to take the tutorial again in some point, his money is going to be SET and not updated.

You may also set players money in right after your tutorial, as I read your code. In case X, the last case in general, you may use your function to set players money. You need to search for your give money function in your gamemode and use it in your last case.

If your functions doesn't work, you would like to paste the functions here so we can figure it out.
Aha, thank you, but even if I give him money right after he finishes the tutorial, the ini file states 0 and /stats check also gives me a 0 value.. +when I login next time, I spawn with the same way I spawned on the first time.

P.S. the spawnplayer on the last case, doesn't spawn the player, it just shows the <<<>>>>SPAWN buttons, and you have to hit the button, how do I cancel that?


basically what I am asking is:

how to save the money/pos?
how to spawn the player after he finishes the tutorial/or after he dies?


thanks!

p.s. I have this:
Код:
new INI:file = INI_Open(UserPath(playerid));
           	INI_SetTag(file, "PlayerInfo");
           	INI_WriteString(file, "Password", PlayerInfo[playerid][Password]);
           	INI_WriteInt(file, "AdminLevel", 0);
           	INI_WriteInt(file, "VIPLevel", 0);
           	INI_WriteInt(file, "Money", 0);
           	INI_WriteInt(file, "Score", 0);
           	INI_WriteInt(file, "Kills", 0);
           	INI_WriteInt(file, "Deaths", 0);
           	INI_WriteInt(file, "Faction", 0);
			INI_WriteInt(file, "Facrank", 0);
			INI_WriteInt(file, "Facleader", 0);
           	INI_Close(file);
when I edit the money here, it doesn't give the player money in game when I login..the data just doesn't save..

I am getting a YSI corrupted memory message *beep* when I start server.exe
server log:

Код:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[21:07:16] 
[21:07:16] Server Plugins
[21:07:16] --------------
[21:07:16]  Loading plugin: streamer
[21:07:16] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[21:07:16]   Loaded.
[21:07:16]  Loading plugin: sscanf
[21:07:16] 

[21:07:16]  ===============================

[21:07:16]       sscanf plugin loaded.     

[21:07:16]          Version:  2.8.2        

[21:07:16]    © 2012 Alex "******" Cole  

[21:07:16]  ===============================

[21:07:16]   Loaded.
[21:07:16]  Loading plugin: whirlpool
[21:07:16]  
[21:07:16]  ==================
[21:07:16]  
[21:07:16]   Whirlpool loaded
[21:07:16]  
[21:07:16]  ==================
[21:07:16]  
[21:07:16]   Loaded.
[21:07:16]  Loaded 3 plugins.

[21:07:16] 
[21:07:16] Filterscripts
[21:07:16] ---------------
[21:07:16]   Loading filterscript 'gl_realtime.amx'...
[21:07:16]   Loading filterscript 'skinchanger.amx'...
[21:07:16] 
--Admin Player Skin Changer Loaded

[21:07:16]   Loading filterscript 'vspawner.amx'...
[21:07:16] 
--Admin Vehicle Spawner Loaded

[21:07:16]   Loaded 3 filterscripts.

[21:07:16]  
[21:07:16]  
[21:07:16]  
[21:07:16]  ======================================= 
[21:07:16]  |                                     | 
[21:07:16]  |        YSI version 4.00.0001        | 
[21:07:16]  |        By Alex "******" Cole        | 
[21:07:16]  |                                     | 
[21:07:16]  ======================================= 
[21:07:16]  
[21:07:16] *** YSI Warning: y_malloc set up via "CallLocalFunction", memory corruption is a remote possibility
[21:07:16] Number of vehicle models: 3
maybe it has something to do with it?
Reply


Messages In This Thread
spawning a player - by MrCesar - 18.10.2016, 16:48
Re: spawning a player - by TheDrx - 18.10.2016, 17:42
Re: spawning a player - by MrCesar - 18.10.2016, 18:12

Forum Jump:


Users browsing this thread: 1 Guest(s)