save gun on logoit - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: save gun on logoit (
/showthread.php?tid=38731)
save gun on logoit -
Martin_Smith - 02.06.2008
how do i save the weapons on logout, but lose on death
Re: save gun on logoit -
Carlos_Leone - 02.06.2008
Just to make sure, are you using a register / login script, if so what one?
Re: save gun on logoit -
Owenlishious - 13.06.2010
can you give us a small example if we did have a register system?
i belive i have to add it in "enum" and so on...
but what code is it to receive the the infomation of the gun/ammo he has and to save it?
not asking for long codes just the code thats used for it.
Re: save gun on logoit -
Owenlishious - 13.06.2010
bump -_-
Re: save gun on logoit -
Flashy - 13.06.2010
Savнng stats, kills, deaths, weapons and positions is very easy to create. Just read the Basics from SAMP Wiki and you will script it with success!
Re: save gun on logoit -
Owenlishious - 14.06.2010
yes but i need a example using dini...
so anyone care to help me firgure this out?
Re: save gun on logoit -
Cameltoe - 14.06.2010
// Userfile define
Код:
#define userfile "/users/%s.ini"
// User file
// Format
Код:
format(cfile, 128, userfile, GetName(playerid));
// Set int
Код:
dini_IntSet(cfile, "Money", 0);
// Get int
Код:
SetPlayerMoney(playerid, dini_Int(cfile, "Money"));
// GetName func.
Код:
stock GetName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
return name;
}
- I hope this helps you
Re: save gun on logoit -
Owenlishious - 14.06.2010
yes i think this will help me
thx mate!
Re: save gun on logoit -
Cameltoe - 14.06.2010
Let me know if it didn't, i don't have too much knowledge with pawn.. but i love to help
Re: save gun on logoit -
Owenlishious - 14.06.2010
its alright same here
so far i made my own drug system that save with dini but saving weapons is a bit more complicated :P
like it needs GetPlayerWeaponInfo, etc and such
but ty