[Ajuda] Upgrade Caixinha de Presente - 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: [Ajuda] Upgrade Caixinha de Presente (
/showthread.php?tid=460128)
Upgrade Caixinha de Presente -
MaLaLvisK - 26.08.2013
A caixinha de presente veio instalada no meu GM, й possнvel pegar ela uma vez a cada PayDay, eu queria que alguйm arrumasse para ficar possнvel pegar ela sу com + de 10 players on no servidor. Ou se criasse um comando para poder bloquear e desbloquear ela. Assim os ADMs sу iriam desbloquear ela, quando tivesse um certo nъmero de Players on!
Код:
if(PlayerToPoint(5.0,playerid,1472.7687,-1714.8226,15.1903))
{
new DinheiroCaixinha = 1000 + random(20000);
new RespeitoCaixinha = random(5);
if(PlayerInfo[playerid][pCaixinha] == char)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк pegou uma Caixinha hб pouco tempo, volte novamente apуs o prуximo salбrio!");
return 1;
}
else
{
new string[128];
PlayerInfo[playerid][pCaixinha] = char;
format(string, sizeof(string), "Player: [%s] pegou uma Caixinha, %d de dinheiro e %d de respeito, Corra para Pegar a Sua !.",PlayerName(playerid),DinheiroCaixinha, RespeitoCaixinha);
SendClientMessageToAll(COR_COSA,string);
GivePlayerMoney(playerid, DinheiroCaixinha);
PlayerInfo[playerid][pExp] += RespeitoCaixinha;
SendClientMessage(playerid, COR_BALLAS, "{A020F0}Vocк ganhou uma caixinha de presente,volte novamento apуs o prуximo salбrio!");
format(string, sizeof(string), "{A020F0}Na caixinha continha %d de dinheiro e %d de respeito !",
DinheiroCaixinha, RespeitoCaixinha);
SendClientMessage(playerid, COR_BALLAS, string);
}
Re: Upgrade Caixinha de Presente -
Juniiro3 - 26.08.2013
pawn Код:
if(PlayerToPoint(5.0,playerid,1472.7687,-1714.8226,15.1903))
{
new DinheiroCaixinha = 1000 + random(20000);
new RespeitoCaixinha = random(5);
if(PlayerInfo[playerid][pCaixinha] == char)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк pegou uma Caixinha hб pouco tempo, volte novamente apуs o prуximo salбrio!");
return 1;
}
if ( JogadoresContectados() < 10 )
{
SendClientMessage ( playerid , COLOR_GRAD1 , "Caixinhas sу pode ser utilizadas com 10 jogadores conectados !" ) ;
return 1;
}
new string[128];
PlayerInfo[playerid][pCaixinha] = char;
format(string, sizeof(string), "Player: [%s] pegou uma Caixinha, %d de dinheiro e %d de respeito, Corra para Pegar a Sua !.",PlayerName(playerid),DinheiroCaixinha, RespeitoCaixinha);
SendClientMessageToAll(COR_COSA,string);
GivePlayerMoney(playerid, DinheiroCaixinha);
PlayerInfo[playerid][pExp] += RespeitoCaixinha;
SendClientMessage(playerid, COR_BALLAS, "{A020F0}Vocк ganhou uma caixinha de presente,volte novamento apуs o prуximo salбrio!");
format(string, sizeof(string), "{A020F0}Na caixinha continha %d de dinheiro e %d de respeito !",
DinheiroCaixinha, RespeitoCaixinha);
SendClientMessage(playerid, COR_BALLAS, string);
}
JogadoresConectados()
{
new Jogadores = 0 ;
for ( new i ; i < MAX_PLAYERS ; ++ i )
if ( IsPlayerConnected ( i ) )
++ Jogadores;
return Jogadores;
}
Tenta Ai