SA-MP Forums Archive
Important questions - 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: Important questions (/showthread.php?tid=195329)



Important questions - [JnA]DukeNukem - 02.12.2010

Ok guys.....i have some more questions...
How do i save weapons/stats/skins when player logs off and how to make him use the same again,therefore skiping the skin choosing scene at the begining?

How to check if a player has some weapons?


Re: Important questions - LarzI - 02.12.2010

Read up on dINI, dUDB, yINI or djSon (file systems)


Re: Important questions - [JnA]DukeNukem - 02.12.2010

Could you simplefy that please?


Re: Important questions - Ash. - 02.12.2010

They are basic file systems used in and around SAMP -

Seeing as you are a begginer at filing (obviously) - i suggest you take a look at dini. Search these forums for Dini and DracoBlue.

Also, if you dont know how to save that sort of data, you cant really offer "Gamemodes for $5"?


Re: Important questions - [JnA]DukeNukem - 02.12.2010

Quote:
Originally Posted by funky1234
Посмотреть сообщение
They are basic file systems used in and around SAMP -

Seeing as you are a begginer at filing (obviously) - i suggest you take a look at dini. Search these forums for Dini and DracoBlue.

Also, if you dont know how to save that sort of data, you cant really offer "Gamemodes for $5"?
I know what those are,but i've never tried to use them for such purposes


Re: Important questions - [JnA]DukeNukem - 02.12.2010

.ini files.oh yea,i forgot xS


Re: Important questions - Ash. - 02.12.2010

Well, heres a run down...

pawn Код:
dini_Create(const file[]);
Creates Files
pawn Код:
dini_Set(const file[], key[], string[]);
//Variations for Floats and Integers!
//Float Variation:
dini_FloatSet
//Integert Variation
diniIntSet
Sets a string/float/integer using keys to identify in a file
pawn Код:
dini_Get(const file[], key[])
//Variations for Float / Integer:
dini_Float
//Integer
dini_Int
Gets saved data using keys
pawn Код:
dini_Exists(const file[])
returns whether a file exists (1) or not (0)
pawn Код:
dini_Remove(const file[]) //I think
removes a file


Re: Important questions - [JnA]DukeNukem - 02.12.2010

Thanks!....


Re: Important questions - Think - 02.12.2010

Quote:
Originally Posted by [JnA]DukeNukem
Посмотреть сообщение
Ok guys.....i have some more questions...
therefore skiping the skin choosing scene at the begining?

How to check if a player has some weapons?
To answer those questions;
1. Check if the player has an account
2. if yes > spawn him (SpawnPlayer(playerid)) if no > create an account and let him choose a skin

and

GetPlayerWeapon // Currently holding
GetPlayerWeaponData // All in 'pocket'

these would help you to detect if the player has weapons.