help please - 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 please (
/showthread.php?tid=552953)
help please -
Jhony_Blaze - 27.12.2014
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.
Re: help please -
Facerafter - 27.12.2014
Put
Код:
SetPlayerScore(playerid, 10);
after the player has logged in/registered.
Re: help please -
HY - 27.12.2014
pawn Код:
new Registered[MAX_PLAYERS];
// Under your register code add
Registered[playerid] = 1;
public OnPlayerSpawn(playerid)
{
SetPlayerScore(playerid, 10);
Registered[playerid] = 0;
return 1;
}
Re: help please -
jackx3rx - 27.12.2014
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);
Re: help please -
Jhony_Blaze - 27.12.2014
This is how my code looks like under OnPlayerConnect
Код:
PlayerInfo[playerid][Score] = 0;
I tried changing that to 10 but nothing happened in game.
Re: help please -
Jhony_Blaze - 28.12.2014
Help?
Re: help please -
cyberlord - 28.12.2014
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
Re: help please -
Facerafter - 28.12.2014
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]);