Score system.
#1

I need help, with the score system, I want that the score from all players keep save (if they're registered, of course), if anyone have the font code for the SATDM v9, it will help me a lot.

Also, I'm looking for the font code that makes the server gives score to the users each momment. And in the chat appears the message, something like: "[Event] Server give you 10 score for event."

I hope you can help me.
Reply
#2

You would need to set up <YSI\y_ini>

PHP код:
INI_Int("Score",pInfo[playerid][Score]) 
public OnPlayerDisconnect
PHP код:
INI_WriteInt(file,"Score",GetPlayerScore(playerid)); 
This code will not work by copy and pasting it, I don't have time right now to make a tutorial. But just search 'y_ini saving system'.

For the score reward just add a timer
PHP код:
pInfo[playerid][Score]+10//need y_ini setup 
But then again look at tutorials.
Reply
#3

Also you can use Dini

You need to include includes, and have basic register system

PHP код:
#include <dini> 
PHP код:
enum pInfo
{
    
pScore
}
new 
PlayerInfoMAX_PLAYERS ][ pInfo ]; 
Add stock

PHP код:
stock GetName(playerid)
{
     new 
nameMAX_PLAYER_NAME+];
     
GetPlayerName(playeridnamesizeofname ));
     return 
name;

in public OnPlayerSpawn(playerid)

PHP код:
new str256+];
formatstrsizeofstr ), "%s.ini"GetName(playerid));
SetPlayerScore(playeriddini_Intfile"Score"); 
in public OnPlayerDisconnect(playerid)

PHP код:
dini_IntSetfile"Score"PlayerInfoplayerid ][ pScore ]); 
in public OnPlayerDeath

PHP код:
PlayerInfokillerid ][ pScore ] ++; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)