SA-MP Forums Archive
[Pedido] FS de Gold - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] FS de Gold (/showthread.php?tid=369190)



FS de Gold - Rhayziin - 16.08.2012

Vou explicar como й o FS...

Ganha 1 Gold a cada 3 Minutos.
Juntando 1000 de Gold compra Vip.
E comando /meugold para mostrar quantos gold tem.

Se alguem tiver ou souber de algum link ou FS parecido, me ajuda ae...


Desde jб Agradeзo!

JБ RESOLVIDO!
pawn Код:
#include <a_samp>
#include <Dini>
new Text:Textdraw1[MAX_PLAYERS];
new Text:Textdraw0[MAX_PLAYERS];
new Gold[MAX_PLAYERS];
new tGolder[MAX_PLAYERS];
#define COR_AQUI 0xFF00EBFF
public OnPlayerSpawn(playerid)
{
SetTimerEx("Timer",60000,true,"i",playerid);
SetTimer("ActualizarTextDraws",true,60000);
///////////////////////// GOLD ////////////////////////////////////////////////
Textdraw0[playerid] = TextDrawCreate(551.000000, 291.000000, "Gold: 0");
TextDrawBackgroundColor(Textdraw0[playerid], 255);
TextDrawFont(Textdraw0[playerid], 3);
TextDrawLetterSize(Textdraw0[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw0[playerid], 65535);
TextDrawSetOutline(Textdraw0[playerid], 0);
TextDrawSetProportional(Textdraw0[playerid], 1);
TextDrawSetShadow(Textdraw0[playerid], 1);
//////////////////////////tGolder//////////////////////////////////////////////
Textdraw1[playerid] = TextDrawCreate(551.000000, 268.000000, "tGolder: 0/3");
TextDrawBackgroundColor(Textdraw1[playerid], 255);
TextDrawFont(Textdraw1[playerid], 1);
TextDrawLetterSize(Textdraw1[playerid], 0.280000, 2.100000);
TextDrawColor(Textdraw1[playerid], -16776961);
TextDrawSetOutline(Textdraw1[playerid], 0);
TextDrawSetProportional(Textdraw1[playerid], 1);
TextDrawSetShadow(Textdraw1[playerid], 1);
return 1;
}
forward ActualizarTextDraws();
public ActualizarTextDraws()
{
new String[100];

for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
format(String, sizeof(String), "GOLD: %d", Gold[playerid]);
TextDrawSetString(Textdraw0[playerid], String);
TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
format(String, sizeof(String), "%d / 3", tGolder[playerid]);
TextDrawSetString(Textdraw1[playerid], String);
TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
}
}
}
forward Timer(playerid);
public Timer(playerid)
{
tGolder[playerid]++;
if(tGolder[playerid] == 3)
{
Gold[playerid]++;
SendClientMessage(playerid,COR_AQUI,"Parabйns, vocк ganhou 1 GOLD");
tGolder[playerid] = 0;
}
if(Gold[playerid] == 10)
{
GivePlayerMoney(playerid, 10000);
SendClientMessage(playerid,COR_AQUI,"Parabйns, vocк conseguiu 10 Golds e ganhou R$ 10.000,00 ");
Gold[playerid] = 0;
}
return 1;
}
public OnPlayerConnect(playerid)
{
if(dini_Isset("Golds.dkn",PlayerName(playerid))) Gold[playerid] = (playerid,dini_Int("Golds.dkn",PlayerName(playerid)));
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
dini_IntSet("Golds.dkn",PlayerName(playerid),Gold[playerid]);
return 1;
}
public OnGameModeInit()
{
if(!fexist("Golds.dkn")) dini_Create("Golds.dkn");
return 1;
}
stock PlayerName(playerid)
{
new PlayerNameGold[MAX_PLAYERS];
GetPlayerName(playerid, PlayerNameGold, MAX_PLAYERS);
return PlayerNameGold;
}



Re: FS de Gold - leonardo1434 - 16.08.2012

Faz o seu prуprio dг !


Re: FS de Gold - Rhayziin - 16.08.2012

:@ Sou novato rapaz.

kkk Se eu soubesse nгo tava aki no Forum SAMP pedindo como faz alguns...



Re: FS de Gold - leonardo1434 - 16.08.2012

Ser novo nгo significa ser burro e muito menos preguiзoso, Tente fazer o seu prуprio, caso nгo consiga, poste os erros e etc. Assim irбs aprender mais que um cуdigo pronto.


Re: FS de Gold - Rhayziin - 16.08.2012

Quote:
Originally Posted by leonardo1434
Посмотреть сообщение
Ser novo nгo significa ser burro e muito menos preguiзoso, Tente fazer o seu prуprio, caso nгo consiga, poste os erros e etc. Assim irбs aprender mais que um cуdigo pronto.
Nгo gostei de sua expressгo kkkkk'

^^ Mas tentei, e consegui... ^^ peguei um sistema de level e editei.
Vlw por o seu comment msm assim...
Agora й sу encontrar um sistema de vip bom...