help please
#1

So.. I got a quick question, how could I create a system so the player when first registers on my server, it will get 10 score ? I got a stunt server.
Reply
#2

Put
Код:
SetPlayerScore(playerid, 10);
after the player has logged in/registered.
Reply
#3

pawn Код:
new Registered[MAX_PLAYERS];

// Under your register code add

Registered[playerid] = 1;

public OnPlayerSpawn(playerid)
{
    SetPlayerScore(playerid, 10);
    Registered[playerid] = 0;
    return 1;
}
Reply
#4

How does your register system work? When the players name is registered you want to set their score/level to 10. Heres a quick example:

pawn Код:
PlayerInfo[playerid][pScore] = 10;

PlayerInfo[playerid][pLevel] = 10;
Or you could use the function:

pawn Код:
SetPlayerScore(playerid,10);
Reply
#5

This is how my code looks like under OnPlayerConnect

Код:
PlayerInfo[playerid][Score] = 0;
I tried changing that to 10 but nothing happened in game.
Reply
#6

Help?
Reply
#7

if u are using mysql u need to inser into your score field 10 and then on playerload data ( if u have one ) will lode that value into your variable PlayerInfo[playerid][Score]; and then just type GivePlayerScore(playerid, PlayerInfo[playerid][Score] = 0); if u not using mysql its the same just set value to store in those user files
Reply
#8

Quote:
Originally Posted by Jhony_Blaze
Посмотреть сообщение
This is how my code looks like under OnPlayerConnect

Код:
PlayerInfo[playerid][Score] = 0;
I tried changing that to 10 but nothing happened in game.
Код:
SetPlayerScore(playerid, PlayerInfo[playerid][Score]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)