[Pedido] Level EXP por minutos
#1

Olб,
Estou trabalhando num GM e me dediquei a editar a " ECONOMIA " do SERVIDOR
OBS : serv RPG
portanto , tirei as famosas " caixinhas " ( onde o player pode pegar dinheiro e EXP )
ao Remover isso o player nгo hб como receber nenhum tipo de EXP , portanto ele nгo muda de NIVEL
OBS 2 : estou usando GF

vi em uma GM , creio que seja a "MUCA RPG", (me corrijam se eu estiver errado) que a cada "x" minutos o player recebia [1/5] de XP , ao completar [5/5] ele consequentemente iria UPA de NIVEL
Gostaria de um COD semelhante
OBS 3 : nгo estou pedindo este cod de mгos beijadas , apenas pedi uma ajuda caso jб tenha um por ai que vocкs possam me indicar ( ja usei o search)
Reply
#2

Eu nгo gosto muito do search, o ****** dб resultados mais diretos.

https://sampforum.blast.hk/showthread.php?tid=151296
https://sampforum.blast.hk/showthread.php?tid=449938

-
https://sampforum.blast.hk/showthread.php?tid=502080
Aqui й o sistema por hora, alterando o tempo com algumas adaptaзхes vocк faz de x em x minutos.

Depois й sу criar uma textdraw no canto da tela com a variбvel da experiкncia.
Reply
#3

Uma BASE altere como o gosto!


Coloque no topo.
PHP код:
new Exp[MAX_PLAYERS]; 
coloque em OnPlayerSpawn.
PHP код:
SetTimerEx("UPLevel"600001"i"playerid); //60000 = tempo [60000 й 1 minuto] 
Coloque em qualquer lugar.
PHP код:
forward UPLevel(playerid);
public 
UPLevel(playerid)
{
    new 
string[250];
    if(
Exp[playerid] >= 0)
    {
        
Exp[playerid] += 1;
        
format(stringsizeof(string), "{4DF235}| UP | Vocк ganhou +1 de Experiкncia ( %d/5 )",Exp[playerid]);
        
SendClientMessage(playerid, -1string);
        
GameTextForPlayer(playerid"~y~UP!"50006);
     }
    if(
Exp[playerid] >= 5)
    {
        
Exp[playerid] = 0;
        
SetPlayerScore(playeridGetPlayerScore(playerid)+1);
        
SendClientMessage(playerid, -1"{4DF235}| UP | Vocк juntou 5 de Experiкncia, e ganhou +1 level ( 1 )");
        
GameTextForPlayer(playerid"~y~UP LEVEL!"50006);
    }
    return 
1;

Reply
#4

Quote:
Originally Posted by D3sconn3ct
Посмотреть сообщение
Uma BASE altere como o gosto!



PHP код:
new Exp[MAX_PLAYERS]; 
PHP код:
SetTimerEx("UPLevel"6000001"i"playerid); // 600000 = tempo 
PHP код:
forward UPLevel(playerid);
public 
UPLevel(playerid)
{
    new 
string[250];
    if(
Exp[playerid] >= 0)
    {
        
Ex[playerid] += 1;
        
format(stringsizeof(string), "{4DF235}| UP | Vocк ganhou +1 de Experiкncia ( %d/5 )",Exp[playerid]);
        
SendClientMessage(playerid, -1string);
        
GameTextForPlayer(playerid"~y~UP!"50006);
     }
    if(
Exp[playerid] >= 5)
    {
        
Exp[playerid] = 0;
        
SetPlayerScore(playeridGetPlayerScore(playerid)+1);
        
SendClientMessage(playerid, -1"{4DF235}| UP | Vocк juntou 5 de Experiкncia, e ganhou +1 level ( 1 )");
        
GameTextForPlayer(playerid"~y~UP LEVEL!"50006);
    }
    return 
1;

Desculpe , sou INICIANTE em PAWN
poderia me dizer em que area eu deveria por cada COd?
Reply
#5

Quote:
Originally Posted by Mnnny
Посмотреть сообщение
Desculpe , sou INICIANTE em PAWN
poderia me dizer em que area eu deveria por cada COd?
Reveja o tуpico.
Reply
#6

Quote:
Originally Posted by D3sconn3ct
Посмотреть сообщение
Reveja o tуpico.
Код:
C:\Users\CENSURADO\Desktop\CENSURADO\gamemodes\CENSURADOpwn(14102) : error 021: symbol already defined: "SetTimerEx"
C:\Users\CENSURADO0\Desktop\CENSURADO\gamemodes\CENSURADOpwn(71933) : error 017: undefined symbol "Ex"
C:\Users\CENSURADO\Desktop\CENSURADO\gamemodes\CENSURADO.pwn(71933) : warning 215: expression has no effect
C:\Users\CENSURADO\Desktop\CENSURADO\gamemodes\CENSURADO.pwn(71933) : error 001: expected token: ";", but found "]"
C:\Users\CENSURADO\Desktop\CENSURADO\gamemodes\CENSURADO.pwn(71933) : error 029: invalid expression, assumed zero
C:\Users\CENSURADODesktop\CENSURADO\gamemodes\CENSURADO.pwn(71933) : fatal error 107: too many error messages on one line
Prints de onde coloquei as coisas
http://prntscr.com/7j1788
http://prntscr.com/7j17p3
http://prntscr.com/7j189f
Reply
#7

Linha: 71933 Altere para: Exp[playerid] += 1;

Procure public OnPlayerSpawn(playerid)
Coloque apos SetTimerEx("UPLevel", 60000, 1, "i", playerid);
Reply
#8

Quote:
Originally Posted by D3sconn3ct
Посмотреть сообщение
Linha: 71933 Altere para: Exp[playerid] += 1;

Procure public OnPlayerSpawn(playerid)
Coloque apos SetTimerEx("UPLevel", 60000, 1, "i", playerid);
Код:
(14102) : error 021: symbol already defined: "SetTimerEx"
http://prntscr.com/7j1iup
Reply
#9

-.-'

Cara vocк esta colocando fora da public!

Exemplo
PHP код:
public OnPlayerSpawn(playerid)
{
    
SetTimerEx("UPLevel"600001"i"playerid);
    return 
1;

Reply
#10

Quote:
Originally Posted by D3sconn3ct
Посмотреть сообщение
-.-'

Cara vocк esta colocando fora da public!

Exemplo
PHP код:
public OnPlayerSpawn(playerid)
{
    
SetTimerEx("UPLevel"600001"i"playerid);
    return 
1;

Код:
(13949) : error 010: invalid function or declaration
(13950) : error 010: invalid function or declaration
(13951) : error 010: invalid function or declaration
(13952) : error 010: invalid function or declaration
(13954) : error 010: invalid function or declaration
(13960) : error 010: invalid function or declaration
(13964) : error 010: invalid function or declaration
(13968) : error 010: invalid function or declaration
(13972) : error 010: invalid function or declaration
(13973) : error 010: invalid function or declaration
(13979) : error 010: invalid function or declaration
(13983) : error 010: invalid function or declaration
(13985) : error 010: invalid function or declaration
(13991) : error 010: invalid function or declaration
(13996) : error 010: invalid function or declaration
(13998) : error 010: invalid function or declaration
(14004) : error 010: invalid function or declaration
(14009) : error 010: invalid function or declaration
(14015) : error 010: invalid function or declaration
(14019) : error 010: invalid function or declaration
(14021) : error 010: invalid function or declaration
(14024) : error 010: invalid function or declaration
(14025) : error 010: invalid function or declaration
(14026) : error 010: invalid function or declaration
(14027) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
http://prntscr.com/7j1rk5
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)