Pitanje/savjet: Respekte
Opširnije: Kako da uradim exp na sat vremena, da ide na minut? ( https://imgur.com/a/iWX8Uj0 )
Dodatno: /
Citat: Ryan Firenzo poslato Februar 05, 2024, 22:23:16 POSLE PODNE
Pitanje/savjet: Respekte
Opširnije: Kako da uradim exp na sat vremena, da ide na minut? ( https://imgur.com/a/iWX8Uj0 )
Dodatno: /
[pawn]public OnPlayerConect( playerid )
{
SetTimerEx( "RespektTimer", 60000, true, "i", playerid );
return 1;
}
forward RespektTimer( id );
public RespektTimer( id )
{
//Ne znam kako si definiso respekte u playerinfo...
//xRespekti = normalni respekti, xPRespekti su potrebni respekti, npr. 0/8
//ovo nula ti je xrespekti, a 8 xPRespekti
PlayerInfo[ id ][ xRespekti ] ++; SavePlayer( id );
if( PlayerInfo[ id ][ xRespekti ] >= PlayerInfo[ id ][ xPRespekti ])
{
PlayerInfo[ id ][ xLevel ] ++; PlayerInfo[ id ][ xRespekti ] = 0;
PlayerInfo[ id ][ xPRespekti ] = PlayerInfo[ id ][ xLevel ] * 2 + 4;
SavePlayer( id );
SetPlayerScore( id, PlayerInfo[ id ][ xLevel ]);
}
return 1;
}[/pawn]
Citat: toncikica poslato Februar 06, 2024, 00:05:44 PRE PODNE
[pawn]public OnPlayerConect( playerid )
{
SetTimerEx( "RespektTimer", 60000, true, "i", playerid );
return 1;
}
forward RespektTimer( id );
public RespektTimer( id )
{
//Ne znam kako si definiso respekte u playerinfo...
//xRespekti = normalni respekti, xPRespekti su potrebni respekti, npr. 0/8
//ovo nula ti je xrespekti, a 8 xPRespekti
PlayerInfo[ id ][ xRespekti ] ++; SavePlayer( id );
if( PlayerInfo[ id ][ xRespekti ] >= PlayerInfo[ id ][ xPRespekti ])
{
PlayerInfo[ id ][ xLevel ] ++; PlayerInfo[ id ][ xRespekti ] = 0;
PlayerInfo[ id ][ xPRespekti ] = PlayerInfo[ id ][ xLevel ] * 2 + 4;
SavePlayer( id );
SetPlayerScore( id, PlayerInfo[ id ][ xLevel ]);
}
return 1;
}[/pawn]
Može se i preko y_timers uraditi
Citat: ivandestigo poslato Februar 06, 2024, 12:28:42 POSLE PODNE
Može se i preko y_timers uraditi
Ma brt ima dosta nacina, evo mu jedan pa nek uci...
Ovako je
new string[200], dostigoga[100], level = PI[playerid][pLevel], dostigunuti_Level = PI[playerid][pLevel]+1;
PI[playerid][pSatiIgre] ++;
if(HappyHours == 1) { PI[playerid][pExp] += 2; }
else if(HappyHours == 0) { PI[playerid][pExp] ++; }
if(PI[playerid][pVip] == 4) { PI[playerid][pExp] ++; }
new expkolicina = level * LEVEL_EX;
if(PI[playerid][pExp] >= expkolicina)
{
PI[playerid][pLevel] ++;
SetPlayerScore(playerid, PI[playerid][pLevel]);
PI[playerid][pExp] = 0;
new bonuscic = PI[playerid][pLevel] * 500;
F_NP(playerid, bonuscic);
Citat: toncikica poslato Februar 06, 2024, 00:05:44 PRE PODNE
[pawn]public OnPlayerConect( playerid )
{
SetTimerEx( "RespektTimer", 60000, true, "i", playerid );
return 1;
}
forward RespektTimer( id );
public RespektTimer( id )
{
//Ne znam kako si definiso respekte u playerinfo...
//xRespekti = normalni respekti, xPRespekti su potrebni respekti, npr. 0/8
//ovo nula ti je xrespekti, a 8 xPRespekti
PlayerInfo[ id ][ xRespekti ] ++; SavePlayer( id );
if( PlayerInfo[ id ][ xRespekti ] >= PlayerInfo[ id ][ xPRespekti ])
{
PlayerInfo[ id ][ xLevel ] ++; PlayerInfo[ id ][ xRespekti ] = 0;
PlayerInfo[ id ][ xPRespekti ] = PlayerInfo[ id ][ xLevel ] * 2 + 4;
SavePlayer( id );
SetPlayerScore( id, PlayerInfo[ id ][ xLevel ]);
}
return 1;
}[/pawn]
koj ce ti kurac xPRespecti samo stavis if(PlayerInfo[id][xRespecti] >= PlayerInfo[ id ][ xLevel ] * 2 + 4)
Citat: Ryan Firenzo poslato Februar 07, 2024, 20:50:11 POSLE PODNE
Ovako je
new string[200], dostigoga[100], level = PI[playerid][pLevel], dostigunuti_Level = PI[playerid][pLevel]+1;
PI[playerid][pSatiIgre] ++;
if(HappyHours == 1) { PI[playerid][pExp] += 2; }
else if(HappyHours == 0) { PI[playerid][pExp] ++; }
if(PI[playerid][pVip] == 4) { PI[playerid][pExp] ++; }
new expkolicina = level * LEVEL_EX;
if(PI[playerid][pExp] >= expkolicina)
{
PI[playerid][pLevel] ++;
SetPlayerScore(playerid, PI[playerid][pLevel]);
PI[playerid][pExp] = 0;
new bonuscic = PI[playerid][pLevel] * 500;
F_NP(playerid, bonuscic);
kako da to popravim sada ?
Neaktivno, Lock!