[Ajuda] Salvar EXP com MySQL
#1

Gostaria de ajuda para saber como salvar o EXP de 1 а 4 do player com o banco de dados MySQL.

Este й o meu cуdigo:

PHP Code:
// EXP
new EXPMAX_PLAYERS ];
public 
OnPlayerConnectplayerid )
{
    
SetTimerEx"UpPlayer"600000true"i"playerid );
}
// UpPlayer
forward UpPlayerplayerid );
public 
UpPlayerplayerid )
{
    new 
strEXP128 ],
        
strLevel128 ];
    
    
EXPplayerid ]++;
    if( 
EXPplayerid ] == )
    {
        new 
Level GetPlayerScoreplayerid );
        
SetPlayerScoreplayeridLevel+);
        
EXPplayerid ] = 0;
        
formatstrEXPsizeofstrEXP ), "| UP EXP | Vocк ganhou +1 Ponto de Experiкncia {FFFFFF}[ 4 {33AA33}/ {FFFFFF}4 ]{33AA33}."EXPplayerid ] );
        
SendClientMessageplayeridCOLOR_VERDEESCUROstrEXP );
        
formatstrLevelsizeofstrLevel ), "| LEVEL UP | Vocк juntou 4 Pontos de Experiкncia e upou para o level {FFFFFF}[ %i ]{33AA33}.", ++Level );
        
SendClientMessageplayeridCOLOR_VERDEESCUROstrLevel );
        
PlayerInfoplayerid ][ pLevel ]++;
        
PlayerPlaySoundplayerid11490.00.00.0 );
        
GameTextForPlayerplayerid"+UP!"7000);
        return 
0;
    }
    
formatstrEXPsizeofstrEXP ), "| UP EXP | Vocк ganhou +1 Ponto de Experiкncia {FFFFFF}[ %i {33AA33}/ {FFFFFF}4 ]{33AA33}."EXPplayerid ] );
    
SendClientMessageplayeridCOLOR_VERDEESCUROstrEXP );
    
PlayerPlaySoundplayerid11390.00.00.0 );
    
GameTextForPlayerplayerid"+EXP!"7000);
    return 
1;

Crйditos para o Sistema de XP + Level do JPedro:
https://sampforum.blast.hk/showthread.php?tid=580508
Reply


Messages In This Thread
Salvar EXP com MySQL - by zMorningStar - 18.12.2017, 06:20
Re: Salvar EXP com MySQL - by DelK - 18.12.2017, 10:36
Re: Salvar EXP com MySQL - by IlanZ - 18.12.2017, 12:59
Re: Salvar EXP com MySQL - by zMorningStar - 18.12.2017, 23:53

Forum Jump:


Users browsing this thread: 1 Guest(s)