Can Anyone Help?
#1

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.?
Reply
#2

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

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

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;

Reply
#5

Thanks, what about weapons?
Reply
#6

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

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)