16.08.2012, 05:58
(
Последний раз редактировалось Rhayziin; 16.08.2012 в 08:34.
)
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!
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;
}