[Ajuda] Assalto A Loterica
#3

Tente.
pawn Код:
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA
new AssaltandoLoterica;
new LotericaAssaltada;
forward AssaltoLoterica();
forward LiberarAssaltoLoterica();

public OnFilterScriptInit()
{

print("\n--------------------------------------");

print("» Sistema de assalto a loterica ");

print("» [NNF]Skf ");

print("--------------------------------------\n");

LotericaAssaltada = 0;

return 1;

}

public OnFilterScriptExit()
{

return 1;

}

public OnPlayerCommandText(playerid, cmdtext[])
{

new Fonte[256];

if(strcmp(cmdtext, "/assaltarloteria", true) == 0)
{

if(LotericaAssaltada == 1)
{

SendClientMessage(playerid, COLOR_YELLOW, "A lotйrica estб com o cofre vazio.");

return 1;

}

if(IsPlayerInRangeOfPoint(playerid, 2.0, 1209.8090,-1751.8210,13.5937))
{

AssaltandoLoterica = playerid;

format(Fonte, sizeof(Fonte), "Atenзгo! A Lotйrica estб sendo assaltada por %s.", JogadorNick(playerid));

SendClientMessageToAll(COLOR_YELLOW, Fonte);

SendClientMessage(playerid, COLOR_YELLOW, "Aguarde perto ao cofre para concluir o assalto.");

SetTimerEx("AssaltoLoterica", 30000, 0, "d", playerid);

return 1;

}

else
{

SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");

return 1;

}

return 1;

}

return 0;

}

public AssaltoLoterica()
{

if(IsPlayerConnected(playerid) && AssaltandoLoterica != 999)
{

if(IsPlayerInRangeOfPoint(playerid, 2.0, 1209.8090,-1751.8210,13.5937))
{

GivePlayerMoney(playerid, 100000);

SendClientMessageToAll(COLOR_YELLOW, "Os COPS falharam, a Lotйrica foi assaltada - Os bandidos levaram um total de $100000.");

SendClientMessage(playerid, COLOR_YELLOW, "Vocк recebeu $100000 do assalto б Lotйrica.");

return 1;

}

else
{

SendClientMessageToAll(COLOR_YELLOW, "Os COPS impediram com sucesso o assalto б Lotйrica, os suspeitos fugiram.");

SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");

return 1;

}

}

LotericaAssaltada = 1;

AssaltandoLoterica = 999;

SetTimer("LiberarAssaltoLoterica", 90000, 0);

}

public LiberarAssaltoLoterica()
{

LotericaAssaltada = 0;

AssaltandoLoterica = 999;

SendClientMessageToAll(COLOR_YELLOW, "A Lotйrica informa que os caixas jб estгo prontos para atender os clientes, o dinheiro do assalto foi recomposto.")
;
return 1;

}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{

if(newinteriorid != 3)
{

SendClientMessageToAll(COLOR_YELLOW, "O Sistema de seguranзa da Lotйrica trancou as portas, os suspeitos estгo fora de alcance do cofre.");

SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");

LotericaAssaltada = 1;

AssaltandoLoterica = 999;

SetTimer("LiberarAssaltoLoterica", 90000, 0);

}

return 1;
}

public OnPlayerDeath(playerid, killerid, reason[])
{

if(playerid == AssaltandoLoterica)
{

SendClientMessageToAll( COLOR_YELLOW, "Os COPS impediram com sucesso o assalto б Lotйrica, os suspeitos foram detidos.");

SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo estб na Lotйrica.");

LotericaAssaltada = 1;

AssaltandoLoterica = 999;

SetTimer("LiberarAssaltoLoterica", 90000, 0);

}

return 1;

}

JogadorNick(playerid)
{

new ObterNick[MAX_PLAYER_NAME];

GetPlayerName(playerid, ObterNick, sizeof(ObterNick));

return ObterNick;

}
Reply


Messages In This Thread
[Ajuda] Assalto A Loterica - by Strok - 05.02.2011, 15:55
Re: [Ajuda] Assalto A Loterica - by Lucky ® - 05.02.2011, 15:58
Re: [Ajuda] Assalto A Loterica - by Macintosh - 05.02.2011, 16:01
Re: [Ajuda] Assalto A Loterica - by Strok - 05.02.2011, 16:05
Re: [Ajuda] Assalto A Loterica - by Macintosh - 05.02.2011, 16:06
Re: [Ajuda] Assalto A Loterica - by [NWD]Jim._.Carrey - 05.02.2011, 16:11
Re: [Ajuda] Assalto A Loterica - by Strok - 05.02.2011, 16:14
Re: [Ajuda] Assalto A Loterica - by EoProzinhO - 05.02.2011, 16:15
Re: [Ajuda] Assalto A Loterica - by [NWD]Jim._.Carrey - 05.02.2011, 16:31
Re: [Ajuda] Assalto A Loterica - by Macintosh - 05.02.2011, 16:40

Forum Jump:


Users browsing this thread: 1 Guest(s)