public LevelUP(){
if(dini_Int(file, "Preso") == 1){
Preso[i]++;
format(string, sizeof(string), "(CADEIA) 1 minuto se passou, vocк estб aqui a %d/5 minuto(s)!", Preso[i]);
SendClientMessage(i, verdel, string);
if(Preso[i]>= 5){
Preso[i] = 0;
preso[i] = 0;
}
}
forward UPLevel( playerid );
public UPLevel( playerid )
{
if( IsPlayerConnected( playerid ) && pInfo[ playerid ][ Logado ] == true )
{
if( pInfo[ playerid ][ AFK ] == false )
{
format( gFile, sizeof( gFile ), "Contas/%s.ini", PlayerName( playerid ));
if( pInfo[ playerid ][ Exp ] >= 6 )
{
pInfo[ playerid ][ Exp ] = 0;
pInfo[ playerid ][ Level ] ++;
SendClientMessage( playerid, COLOR_BRANCO, "{6666CC}[ UP ]{FFFFFF} Parabйns, vocк completou [ {6666CC}6{FFFFFF} / {6666CC}6{FFFFFF} ] de experiкncia e upou +1 level !" );
format( gStr, sizeof( gStr ), "Level atual: {6666CC}%d{FFFFFF}.", pInfo[ playerid ][ Level ] );
SendClientMessage( playerid, COLOR_BRANCO, gStr );
GameTextForPlayer( playerid, "UP LEVEL", 3000, 6 );
dini_IntSet( gFile, "Exp", pInfo[ playerid ][ Exp ] );
dini_IntSet( gFile, "Level", pInfo[ playerid ][ Level ] );
SetPlayerScore( playerid, dini_Int( gFile, "Level" ));
SetTimerEx( "PagarSalario", 60000, false, "d", playerid );
}
else
{
format( gStr, sizeof( gStr ), "{6666CC}[ UP ]{FFFFFF} Vocк ganhou 1 ponto de expкriencia [ {6666CC}%d{FFFFFF} / {6666CC}6{FFFFFF} ]", pInfo[ playerid ][ Exp ] );
SendClientMessage( playerid, COLOR_BRANCO, gStr );
GameTextForPlayer( playerid, "UP EXP", 3000, 6 );
pInfo[ playerid ][ Exp ] ++;
dini_IntSet( gFile, "Exp", pInfo[ playerid ][ Exp ] );
}
}
else
{
SendClientMessage( playerid, COLOR_AZULCLARO, "[ > ] Vocк nгo upou por estar no modo AFK ! ( Ausente )" );
}
return 1;
}
return 1;
}
|
Код:
forward UPLevel( playerid );
public UPLevel( playerid )
{
if( IsPlayerConnected( playerid ) && pInfo[ playerid ][ Logado ] == true )
{
if( pInfo[ playerid ][ AFK ] == false )
{
format( gFile, sizeof( gFile ), "Contas/%s.ini", PlayerName( playerid ));
if( pInfo[ playerid ][ Exp ] >= 6 )
{
pInfo[ playerid ][ Exp ] = 0;
pInfo[ playerid ][ Level ] ++;
SendClientMessage( playerid, COLOR_BRANCO, "{6666CC}[ UP ]{FFFFFF} Parabйns, vocк completou [ {6666CC}6{FFFFFF} / {6666CC}6{FFFFFF} ] de experiкncia e upou +1 level !" );
format( gStr, sizeof( gStr ), "Level atual: {6666CC}%d{FFFFFF}.", pInfo[ playerid ][ Level ] );
SendClientMessage( playerid, COLOR_BRANCO, gStr );
GameTextForPlayer( playerid, "UP LEVEL", 3000, 6 );
dini_IntSet( gFile, "Exp", pInfo[ playerid ][ Exp ] );
dini_IntSet( gFile, "Level", pInfo[ playerid ][ Level ] );
SetPlayerScore( playerid, dini_Int( gFile, "Level" ));
SetTimerEx( "PagarSalario", 60000, false, "d", playerid );
}
else
{
format( gStr, sizeof( gStr ), "{6666CC}[ UP ]{FFFFFF} Vocк ganhou 1 ponto de expкriencia [ {6666CC}%d{FFFFFF} / {6666CC}6{FFFFFF} ]", pInfo[ playerid ][ Exp ] );
SendClientMessage( playerid, COLOR_BRANCO, gStr );
GameTextForPlayer( playerid, "UP EXP", 3000, 6 );
pInfo[ playerid ][ Exp ] ++;
dini_IntSet( gFile, "Exp", pInfo[ playerid ][ Exp ] );
}
}
else
{
SendClientMessage( playerid, COLOR_AZULCLARO, "[ > ] Vocк nгo upou por estar no modo AFK ! ( Ausente )" );
}
return 1;
}
return 1;
}
|