Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Filterscript feito por JUNINHOO_COLDPLAY
- /*LABIRINTOOOOOOO*/
- //NÃO REMOVA OS CRÉDITOS SEJA ÉTICO
- //http://divulguegameplay.blogspot.com/
- /*CRÉDITOS
- Feito por: JuNiNhoo_COLDPLAY*/
- #define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- #define COR_3DLABEL 0xFFFFFFAA
- new EmDialog[MAX_PLAYERS];
- new string[128];
- new sendername[MAX_PLAYER_NAME];
- new gNews[MAX_PLAYERS];
- forward OOCNews(COLOR,const string[]);
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- public OnFilterScriptInit()
- {
- //3dTextLabel
- Create3DTextLabel("{FF0000}Chegou no fim do Labirinto\n{FFFF00}Parabéns\n{4B0082}Digite /fim",COR_3DLABEL,4500.7197,-1296.2067,20.8903,10.0,0);//labirinto
- //Pickup======================================================================================================================
- AddStaticPickup(1318, 23, 4500.7197,-1296.2067,20.8903); // Labirinto
- //============================================================================================================================
- //veiculos labirinto
- AddStaticVehicleEx(522,3661.69995117,-2282.10009766,291.39999390,334.00000000,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,3662.30004883,-2283.80004883,291.20001221,333.99536133,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,3663.30004883,-2286.19995117,291.10000610,333.99536133,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,3664.69995117,-2288.10009766,290.89999390,333.99536133,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,3666.00000000,-2289.50000000,290.79998779,333.99536133,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,3667.60009766,-2290.80004883,290.60000610,333.99536133,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,3668.50000000,-2291.89990234,290.60000610,333.99536133,-1,-1,15); //NRG-500
- AddStaticVehicleEx(522,3670.00000000,-2292.50000000,290.50000000,333.99536133,-1,-1,15); //NRG-500
- AddStaticVehicleEx(521,3671.80004883,-2293.10009766,290.29998779,342.00000000,-1,-1,15); //FCR-900
- AddStaticVehicleEx(521,3674.19995117,-2293.69995117,290.20001221,341.99890137,-1,-1,15); //FCR-900
- AddStaticVehicleEx(521,3676.60009766,-2293.89990234,289.89999390,341.99890137,-1,-1,15); //FCR-900
- AddStaticVehicleEx(568,3674.00000000,-2276.39990234,291.20001221,268.00000000,-1,-1,15); //Bandito
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #endif
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/labirinto", cmdtext, true, 10) == 0)
- {
- TogglePlayerControllable(playerid, 0);
- ShowPlayerDialog(playerid,2999,DIALOG_STYLE_LIST,"Labirinto Rockstar","LABIRINTO\nDesligar","Aceitar","Cancelar");
- EmDialog[playerid] = 1;
- return 1;
- }
- if(strcmp("/fim", cmdtext, true) == 0 && PlayerToPoint(3.0, playerid,4500.7197,-1296.2067,20.8903))
- {//Mensagem e Premio labirinto
- GetPlayerName(playerid,sendername,sizeof(sendername));
- format(string, sizeof(string), "[AVISO] %s Chegou no fim do Labirinto Rockstar e ganho 20k!.", sendername);
- OOCNews(0xFF0000,string);
- SendClientMessage(playerid, 0xFFFFFFAA, "Ganho 20k por Chegar no fim do labirinto!");
- GameTextForPlayer(playerid, "~r~Par~w~a ~y~Bens", 5000, 1);
- GivePlayerMoney(playerid, 20000);
- SetPlayerPos(playerid,3676.0088,-2276.2605,290.8437);
- }
- if(!strcmp(cmdtext,"/fimlabirinto",true))
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-2,"só admin RCON pode usar este comando!");
- SetPlayerPos(playerid,4500.7197,-1296.2067,20.8903);//labirinto FIM
- SetPlayerInterior(playerid,0);
- }
- return true;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- //dialog LABIRINTO
- if(dialogid == 2999)
- {
- TogglePlayerControllable(playerid, 1);
- if(!response) { return 1; }
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid,2898,DIALOG_STYLE_LIST,"Labirinto° By:JuNiNhoo_COLDPLAY","Labirinto Rockstar\nVoltar Los Santos","Selecionar","Voltar");
- }
- case 2:
- {
- DisablePlayerCheckpoint(playerid);
- }
- }
- }
- if(dialogid == 2898)
- {
- TogglePlayerControllable(playerid, 1);
- EmDialog[playerid] = 0;
- if(response == 0) { return ShowPlayerDialog(playerid,2599,DIALOG_STYLE_LIST,"Teleporte Labirinto","Labirinto Rockstar\nLos Santos\nDesligar","Aceitar","Cancelar"); }
- switch(listitem)
- {
- case 0:
- {
- ResetPlayerWeapons(playerid);
- SetPlayerInterior(playerid,0);
- GetPlayerName(playerid,sendername,sizeof(sendername));
- format(string, sizeof(string), "[AVISO] %s foi para o Labirinto Rockstar!.", sendername);
- OOCNews(0x2993EDAA,string);
- SetPlayerPos(playerid,3676.0088,-2276.2605,290.8437);//labirinto
- }
- case 1:
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,1493.9459,-1738.5125,13.5469);//ls
- }
- }
- }
- return 1;
- }
- public OOCNews(COLOR,const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!gNews[i])
- {
- SendClientMessage(i, COLOR, string);
- }
- }
- }
- }
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment