save gun on logoit
#1

how do i save the weapons on logout, but lose on death
Reply
#2

Just to make sure, are you using a register / login script, if so what one?
Reply
#3

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.
Reply
#4

bump -_-
Reply
#5

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!
Reply
#6

yes but i need a example using dini...


so anyone care to help me firgure this out?
Reply
#7

// Userfile define
Код:
#define userfile "/users/%s.ini"
// User file
Код:
new cfile[128];
// 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
Reply
#8

yes i think this will help me


thx mate!
Reply
#9

Let me know if it didn't, i don't have too much knowledge with pawn.. but i love to help
Reply
#10

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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)