SA-MP Forums Archive
Can Anyone Help? - 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: Can Anyone Help? (/showthread.php?tid=273985)



Can Anyone Help? - ServerRestart - 04.08.2011

Hi, im wanting to make a register system what saves, Money , Weapons , Color(players color when they buy one), Admin level, ect. Can some one give some help.?


Re: Can Anyone Help? - Kush - 04.08.2011

https://sampforum.blast.hk/showthread.php?tid=273088


Re: Can Anyone Help? - ServerRestart - 04.08.2011

Ok, how would i add other things to that? like saving the players color, once bought, And the players weapons, once bought


Re: Can Anyone Help? - Kush - 04.08.2011

An example would be:

PHP код:
new colors[MAX_PLAYERS];
public 
OnPlayerSpawn(playerid)
{
    if(
colors[playerid] == 1)
    {
           
SetPlayerColor(playerid0xFFFF00AA);
    }
    else if(
colors[playerid] == 2)
    {
           
SetPlayerColor(playerid0xFFE4C4AA);
    }
    return 
1;




Re: Can Anyone Help? - ServerRestart - 04.08.2011

Thanks, what about weapons?


Re: Can Anyone Help? - Kush - 04.08.2011

Exactly same thing, create them in your enum, and upon disconnect save em.


Re: Can Anyone Help? - ServerRestart - 04.08.2011

Your register system aint working properly, when someone registers you can type any pass to login, how to fix it?


Re: Can Anyone Help? - Kush - 04.08.2011

When someone registers a password, they are automatically spawned. You need to relog to ensure that everything saves (as it is saved upon disconnect). I've yet done another test and everything works fine.


Re: Can Anyone Help? - ServerRestart - 04.08.2011

Oh, i've fixed it. sorry, could you give me more info on how to save the players color, like when they type /buycolor dialog menu comes up, and once they click what color they want it takes away 500k and then they have that color forever.