#include < a_samp > #include < foreach > forward RelogioUPs(); forward DesativarTD(); new Text:ReloginhoUP, reloginhoup; public OnGameModeInit() { ReloginhoUP = TextDrawCreate(518.000000, 4.000000, "~y~UP~p~: ~w~10~p~:~w~00"); TextDrawBackgroundColor(ReloginhoUP, 255); TextDrawFont(ReloginhoUP, 1); TextDrawLetterSize(ReloginhoUP, 0.460000, 1.799999); TextDrawColor(ReloginhoUP, -1); TextDrawSetOutline(ReloginhoUP, 1); TextDrawSetProportional(ReloginhoUP, 1); return RelogioUPs(); } public RelogioUPs() { new string[50], foicount1 = 0, TempoRelogio = 59; TempoRelogio--; if(foicount1 == 1) format(string, 50,"~y~UP~p~: ~w~9~p~:~w~%02d", TempoRelogio); else if(foicount1 == 2) format(string, 50,"~y~UP~p~: ~w~8~p~:~w~%02d", TempoRelogio); else if(foicount1 == 3) format(string, 50,"~y~UP~p~: ~w~7~p~:~w~%02d", TempoRelogio); else if(foicount1 == 4) format(string, 50,"~y~UP~p~: ~w~6~p~:~w~%02d", TempoRelogio); else if(foicount1 == 5) format(string, 50,"~y~UP~p~: ~w~5~p~:~w~%02d", TempoRelogio); else if(foicount1 == 6) format(string, 50,"~y~UP~p~: ~w~4~p~:~w~%02d", TempoRelogio); else if(foicount1 == 7) format(string, 50,"~y~UP~p~: ~w~3~p~:~w~%02d", TempoRelogio); else if(foicount1 == 8) format(string, 50,"~y~UP~p~: ~w~2~p~:~w~%02d", TempoRelogio); else if(foicount1 == 9) format(string, 50,"~y~UP~p~: ~w~1~p~:~w~%02d", TempoRelogio); else if(foicount1 == 10) format(string, 50,"~y~UP~p~: ~w~0~p~:~w~%02d", TempoRelogio); TextDrawSetString(ReloginhoUP,string); TextDrawShowForAll(ReloginhoUP); SetTimer("DesativarTD", 1000, false); if(TempoRelogio == 0) { foreach(Player, i) { //VarDeXP[i] ++; TempoRelogio = 59; } } return SetTimer("RelogioUPs", 1000, false); } public DesativarTD() return TextDrawHideForAll(ReloginhoUP); public OnGameModeExit() return KillTimer(reloginhoup);
#include < a_samp >
#include < foreach >
forward RelogioUPs();
forward DesativarTD();
new Text:ReloginhoUP,
reloginhoup;
public OnGameModeInit()
{
ReloginhoUP = TextDrawCreate(518.000000, 4.000000, "~y~UP~p~: ~w~10~p~:~w~00");
TextDrawBackgroundColor(ReloginhoUP, 255);
TextDrawFont(ReloginhoUP, 1);
TextDrawLetterSize(ReloginhoUP, 0.460000, 1.799999);
TextDrawColor(ReloginhoUP, -1);
TextDrawSetOutline(ReloginhoUP, 1);
TextDrawSetProportional(ReloginhoUP, 1);
return RelogioUPs();
}
public RelogioUPs()
{
new string[50], foicount1 = 0, TempoRelogio = 59; TempoRelogio--;
if(foicount1 == 1) format(string, 50,"~y~UP~p~: ~w~9~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 2) format(string, 50,"~y~UP~p~: ~w~8~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 3) format(string, 50,"~y~UP~p~: ~w~7~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 4) format(string, 50,"~y~UP~p~: ~w~6~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 5) format(string, 50,"~y~UP~p~: ~w~5~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 6) format(string, 50,"~y~UP~p~: ~w~4~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 7) format(string, 50,"~y~UP~p~: ~w~3~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 8) format(string, 50,"~y~UP~p~: ~w~2~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 9) format(string, 50,"~y~UP~p~: ~w~1~p~:~w~%02d", TempoRelogio);
else if(foicount1 == 10) format(string, 50,"~y~UP~p~: ~w~0~p~:~w~%02d", TempoRelogio);
TextDrawSetString(ReloginhoUP,string);
TextDrawShowForAll(ReloginhoUP);
SetTimer("DesativarTD", 1000, false);
if(TempoRelogio == 0)
{
foreach(Player, i)
{
// troque pela variavel de respeito, Exemplo:
RespeitoPlayer[i]++;
TempoRelogio = 59;
}
}
return SetTimer("RelogioUPs", 1000, false);
}
public DesativarTD() return TextDrawHideForAll(ReloginhoUP);
public OnGameModeExit() return KillTimer(reloginhoup);
#include < a_samp > #include < foreach > forward RelogioUPs(); forward DesativarTD(); new Text:ReloginhoUP, reloginhoup; public OnGameModeInit() { ReloginhoUP = TextDrawCreate(518.000000, 4.000000, "~y~UP~p~: ~w~10~p~:~w~00"); TextDrawBackgroundColor(ReloginhoUP, 255); TextDrawFont(ReloginhoUP, 1); TextDrawLetterSize(ReloginhoUP, 0.460000, 1.799999); TextDrawColor(ReloginhoUP, -1); TextDrawSetOutline(ReloginhoUP, 1); TextDrawSetProportional(ReloginhoUP, 1); return RelogioUPs(); } public RelogioUPs() { new string[50], foicount1 = 0, TempoRelogio = 59; TempoRelogio--; if(foicount1 == 1) format(string, 50,"~y~UP~p~: ~w~9~p~:~w~%02d", TempoRelogio); else if(foicount1 == 2) format(string, 50,"~y~UP~p~: ~w~8~p~:~w~%02d", TempoRelogio); else if(foicount1 == 3) format(string, 50,"~y~UP~p~: ~w~7~p~:~w~%02d", TempoRelogio); else if(foicount1 == 4) format(string, 50,"~y~UP~p~: ~w~6~p~:~w~%02d", TempoRelogio); else if(foicount1 == 5) format(string, 50,"~y~UP~p~: ~w~5~p~:~w~%02d", TempoRelogio); else if(foicount1 == 6) format(string, 50,"~y~UP~p~: ~w~4~p~:~w~%02d", TempoRelogio); else if(foicount1 == 7) format(string, 50,"~y~UP~p~: ~w~3~p~:~w~%02d", TempoRelogio); else if(foicount1 == 8) format(string, 50,"~y~UP~p~: ~w~2~p~:~w~%02d", TempoRelogio); else if(foicount1 == 9) format(string, 50,"~y~UP~p~: ~w~1~p~:~w~%02d", TempoRelogio); else if(foicount1 == 10) format(string, 50,"~y~UP~p~: ~w~0~p~:~w~%02d", TempoRelogio); TextDrawSetString(ReloginhoUP,string); TextDrawShowForAll(ReloginhoUP); SetTimer("DesativarTD", 1000, false); if(TempoRelogio == 0) { foreach(Player, i) { RespeitoCaixinha[i] ++; TempoRelogio = 59; } } return SetTimer("RelogioUPs", 1000, false); } public DesativarTD() return TextDrawHideForAll(ReloginhoUP); public OnGameModeExit() return KillTimer(reloginhoup);
error 017: undefined symbol "RespeitoCaixinha" warning 215: expression has no effect error 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line
new RespeitoCaixinha[MAX_PLAYERS];
new RespeitoCaixinha[MAX_PLAYERS];
Funcionou , mas acho que o sistema nгo funfa
alterei o tempo de 59 para 1 no caso seria 1 minuto passou 1 minuto e ele nao add nenhum Respeito |
//TOP new Level[MAX_PLAYERS]; new Respeito[MAX_PLAYERS];
forward Timer(playerid); public Timer(playerid) { Respeito[playerid]++; SendClientMessage(playerid,COR_AQUI,"Parabens Aumentou seu Respeito Mais um Pouco Aumenta o Level"); if(Respeito[playerid] == 5) { Level[playerid]++; SendClientMessage(playerid,COR_AQUI,"**** Parabens Upou Seu Level ****"); Respeito[playerid] = 0; } return 1; }
if(!fexist("levels.dkn")) dini_Create("levels.dkn");
dini_IntSet("levels.dkn",PlayerName(playerid),Level[playerid]);
if(dini_Isset("levels.dkn",PlayerName(playerid))) Level[playerid] = (playerid,dini_Int("levels.dkn",PlayerName(playerid)));
stock PlayerName(playerid) { new PlayerNameLevel[MAX_PLAYERS]; GetPlayerName(playerid, PlayerNameLevel, MAX_PLAYERS); return PlayerNameLevel; }
warning 219: local variable "Level" shadows a variable at a preceding level
Tenta este codigo aqui do IpsBruno
Код:
stock PlayerName(playerid) { new PlayerNameLevel[MAX_PLAYERS]; GetPlayerName(playerid, PlayerNameLevel, MAX_PLAYERS); return PlayerNameLevel; } |
stock PlayerName(playerid)
{
new PlayerNameLevel[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerNameLevel, sizeof(PlayerNameLevel));
return PlayerNameLevel;
}
Tenta este codigo aqui do IpsBruno
Код:
//TOP new Level[MAX_PLAYERS]; new Respeito[MAX_PLAYERS]; Код:
forward Timer(playerid); public Timer(playerid) { Respeito[playerid]++; SendClientMessage(playerid,COR_AQUI,"Parabens Aumentou seu Respeito Mais um Pouco Aumenta o Level"); if(Respeito[playerid] == 5) { Level[playerid]++; SendClientMessage(playerid,COR_AQUI,"**** Parabens Upou Seu Level ****"); Respeito[playerid] = 0; } return 1; } Em OnGameModeInit: PHP код:
PHP код:
PHP код:
Код:
stock PlayerName(playerid) { new PlayerNameLevel[MAX_PLAYERS]; GetPlayerName(playerid, PlayerNameLevel, MAX_PLAYERS); return PlayerNameLevel; } |