18.03.2018, 20:35
(
Последний раз редактировалось HelderPT; 18.03.2018 в 22:58.
)
PHP код:
forward upJean( );
public upJean( )
{
foreach(Player, i)
{
if(PlayerInfo[i][pLogged] == 1){
if(AFK[i] == 0){
if( PlayerInfo[ i ][ SegUP ] > 0 )
{
PlayerInfo[ i ][ SegUP ] --;
}
if( PlayerInfo[ i ][ SegUP ] == 0 && PlayerInfo[ i ][ MinUP ] >= 1 )
{
PlayerInfo[ i ][ SegUP ] = 59;
PlayerInfo[ i ][ MinUP ] --;
}
if( PlayerInfo[ i ][ MinUP ] == 0 && PlayerInfo[ i ][ SegUP ] == 0 )
{
PlayerInfo[ i ][ SegUP ] = 00;
PlayerInfo[ i ][ MinUP ] = 10;
GanharExp(i);
}
if( PlayerInfo[ i ][ Tem_RelogioUP ] == 1 )
{
format( gStr, sizeof( gStr ), "~w~+UP~b~: ~w~%02d~b~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
if( PlayerInfo[ i ][ RelogioCor ] == 0 )
{
format( gStr, sizeof( gStr ), "~w~+UP~b~: ~w~%02d~b~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 1 )
{
format( gStr, sizeof( gStr ), "~w~+~y~UP: ~w~%02d~y~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 2 )
{
format( gStr, sizeof( gStr ), "~w~+~r~UP: ~w~%02d~r~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 3 )
{
format( gStr, sizeof( gStr ), "~w~+~g~UP: ~w~%02d~g~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 4 )
{
format( gStr, sizeof( gStr ), "~w~+~p~UP: ~w~%02d~p~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 5 )
{
format( gStr, sizeof( gStr ), "~w~+~b~UP: ~w~%02d~b~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 6 )
{
format( gStr, sizeof( gStr ), "~w~+~y~~h~UP: ~w~%02d~y~~h~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 7 )
{
format( gStr, sizeof( gStr ), "~w~+~r~~h~UP: ~w~%02d~r~~h~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 8 )
{
format( gStr, sizeof( gStr ), "~w~+~g~~h~UP: ~w~%02d~g~~h~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 9 )
{
format( gStr, sizeof( gStr ), "~w~+~p~~h~UP: ~w~%02d~p~~h~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
else if( PlayerInfo[ i ][ RelogioCor ] == 10 )
{
format( gStr, sizeof( gStr ), "~w~+~b~~h~UP: ~w~%02d~b~~h~:~w~%02d", PlayerInfo[ i ][ MinUP ], PlayerInfo[ i ][ SegUP ] );
TextDrawSetString( TextLevelUP[ i ], gStr );
}
}
}
}
}
}
forward GanharExp(i);
public GanharExp(i)
{
new string[128];
format(file, sizeof(file), PASTA_CONTAS, PlayerName(i));
if(IsPlayerConnected(i))
{
if(AFK[i] == 0){
{
if(PlayerInfo[i][pExpe] == 4)
{
PlayerInfo[i][pLevel]++;
PlayerInfo[i][pExpe] = 0;
TempoLevelMinuto[i] = 10;
format(string, sizeof(string), "| UP | Vocк acaba de ganhar +1 level, somando um total de %d", PlayerInfo[i][pLevel]);
SendClientMessage(i, 0x00FF00AA, string);
PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
dini_IntSet(file, "EXP", PlayerInfo[i][pExpe]);
dini_IntSet(file, "Level", PlayerInfo[i][pLevel]);
if(dini_Int(file, "Level") > dini_Int("RankL.ini", "LRank1")){
if(strcmp(dini_Get("RankL.ini", "Rank1"), PlayerName(i), true) == 0){
dini_IntSet("RankL.ini", "LRank1", dini_Int(file, "Level"));
}else{
dini_Set("RankL.ini", "Rank2", dini_Get("RankL.ini", "Rank1"));
dini_IntSet("RankL.ini", "LRank2", dini_Int("RankL.ini", "LRank1"));
dini_Set("RankL.ini", "Rank1", PlayerName(i));
dini_IntSet("RankL.ini", "LRank1", dini_Int(file, "Level"));
}
}else{
if(dini_Int(file, "Level") > dini_Int("RankL.ini", "LRank2")){
if(strcmp(dini_Get("RankL.ini", "Rank2"), PlayerName(i), true) == 0){
dini_IntSet("RankL.ini", "LRank2", dini_Int(file, "Level"));
}else{
dini_Set("RankL.ini", "Rank3", dini_Get("RankL.ini", "Rank2"));
dini_IntSet("RankL.ini", "LRank3", dini_Int("RankL.ini", "LRank2"));
dini_Set("RankL.ini", "Rank2", PlayerName(i));
dini_IntSet("RankL.ini", "LRank2", dini_Int(file, "Level"));
}
}else{
if(dini_Int(file, "Level") > dini_Int("RankL.ini", "LRank3")){
dini_Set("RankL.ini", "Rank3", PlayerName(i));
dini_IntSet("RankL.ini", "LRank3", dini_Int(file, "Level"));
}
}
}
Salario(i);
}
else
{
PlayerInfo[i][pExpe]++;
TempoLevelMinuto[i] = 10;
format(string, sizeof(string), "| EXP | Vocк acaba de ganhar +1 ponto de experiкncia (%d/5)", PlayerInfo[i][pExpe]);
SendClientMessage(i, 0x00FF00AA, string);
PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
dini_IntSet(file, "EXP", PlayerInfo[i][pExpe]);
}
}
}
}
return 1;
}
# EDIT
Qnd relogar ou reniciar o sv aumenta 1 lv nao esta salvamndo o minup nem segup help me ;-;