Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================================================
- #include <a_samp>
- #define FILTERSCRIPT
- #define MAX_ROUBO 500
- //==============================================================================
- new string[24];
- //==============================================================================
- new Roubos=-1;
- new bool:Roubou[MAX_ROUBO];
- new bool:LUGAR[MAX_PLAYERS];
- enum pRoubo
- {
- NomeRoubo[100],
- Float:xp,
- Float:yp,
- Float:zp,
- ID
- };
- new PlayerRoubo[MAX_ROUBO][pRoubo];
- //==============================================================================
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Sistemas de Roubos By:[FeK]HigorOliver");
- print("--------------------------------------\n");
- //=====
- RouboADD("Banco Fek Squad",1209.8090,-1751.8210,13.5937);
- //=====
- return 1;
- }
- //==============================================================================
- stock RouboADD(nomete[], Float:xb, Float:yb, Float:zb)
- {
- Roubos++;
- format(PlayerRoubo[Roubos][NomeRoubo],100,"%s",nomete);
- PlayerRoubo[Roubos][xp] = xb;
- PlayerRoubo[Roubos][yp] = yb;
- PlayerRoubo[Roubos][zp] = zb;
- PlayerRoubo[Roubos][ID] = Roubos;
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Roubou[playerid] = true;
- return 1;
- }
- //==============================================================================
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new bosta = listitem;
- new stromg[128];
- if(bosta == PlayerRoubo[bosta][ID]) {
- if(!response) return false;
- format(stromg, sizeof(stromg), "Roubo: %s Esta marcado no mapa", PlayerRoubo[bosta][NomeRoubo]);
- SendClientMessage(playerid, 0xFFFFFFFF, stromg);
- LUGAR[playerid] = true;
- SetPlayerCheckpoint(playerid,PlayerRoubo[bosta][xp],PlayerRoubo[bosta][yp],PlayerRoubo[bosta][zp]+1,2.0);
- return 1;
- }
- return 0;
- }
- //==============================================================================
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/roubos", true)) {
- new dados[1024];
- format(dados, 1024, "");
- for(new lol=0;lol<=Roubos;lol++) {
- format(dados,1024, "%s%s\n",dados,PlayerRoubo[lol][NomeRoubo]);
- }
- ShowPlayerDialog(playerid,256,DIALOG_STYLE_LIST, "Lugares para Roubo",dados,"Ir", "Fechar");
- }
- return 0;
- }
- //==============================================================================
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(LUGAR[playerid] == true)
- {
- if(Roubou[playerid] != true)
- return SendClientMessage(playerid,0xFFFFFFFF,"Espere 10 minultos para roubar de novo.");
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid,0xFFFFFFFF,"Aguarde 10 segundos abrindo o cofre");
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- LUGAR[playerid] = false;
- SetTimerEx("RoubarCofre",10000,false,"i",playerid);
- SetTimerEx("LRoubo",600000,false,"i",playerid);
- }
- return 1;
- }
- //==============================================================================
- forward LRoubo(playerid);
- public LRoubo(playerid)
- {
- Roubou[playerid] = false;
- SendClientMessage(playerid,GetPlayerColor(playerid),"Você ja pode retornar o crime !");
- return false;
- }
- //==============================================================================
- forward RoubarCofre(playerid);
- public RoubarCofre(playerid)
- {
- ClearAnimations(playerid);
- new Dinheiro = 1000 + random(3000);
- format(string, sizeof(string), "~ Você Ganhou %d roubando cofre | Corre Corre Corre!!!!!", Dinheiro);
- SendClientMessage(playerid,GetPlayerColor(playerid),string);
- SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+4);
- GivePlayerMoney(playerid,Dinheiro);
- Roubou[playerid] = true;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement