SA-MP Forums Archive
Help DOF2 - 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)
+--- Thread: Help DOF2 (/showthread.php?tid=627783)



Help DOF2 - Krauser123 - 01.02.2017

Hello, I need some help so I'm using DOF2 saving system and I would like to do like whenever a player is registered and spawned the count get +1 for example the count is



and a player is registered and spawned so it becomes



and the PlayerInfo[playerid][UniqueID] = the count..

I wish you help me


Re: Help DOF2 - TATIK - 01.02.2017

1- Load PlayerInfo[playerid][UniqueID]

2 - PlayerInfo[playerid][UniqueID]++;

3 - save it


Re: Help DOF2 - Krauser123 - 01.02.2017

Quote:
Originally Posted by TATIK
Посмотреть сообщение
1- Load PlayerInfo[playerid][UniqueID]

2 - PlayerInfo[playerid][UniqueID]++;

3 - save it
Nope actually the PlayerInfo[playerid][UniqueID] is depend on the ID count ! and my bug is that all the players share the same uniqueID that's why I want to make a count.


Re: Help DOF2 - Beckett - 01.02.2017

Your idea should work fine. You create a file where you increase the number per each register in game and based on that you gain the ID, but on the other hand have you at least tried to code something or do you expect us to write it all for you?


Re: Help DOF2 - Krauser123 - 01.02.2017

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
Your idea should work fine. You create a file where you increase the number per each register in game and based on that you gain the ID, but on the other hand have you at least tried to code something or do you expect us to write it all for you?
To be honest ! If I have the solution I wouldn't come here but I kept thinking about a solution and I didn't find any. However, I'm trying a code right now so yeah I'm asking for help..


Re: Help DOF2 - Krauser123 - 01.02.2017

EDIT: I found a solution thanks for you all !!