Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
/* ____ _____ _ _ _ / ___|_ _|/ \ / \ _ __ ___ __ _ __| | ___ | | _ | | / _ \ / _ \ | '__/ __/ _` |/ _` |/ _ \ | |_| | | |/ ___ \ / ___ \| | | (_| (_| | (_| | __/ \____| |_/_/ \_\ /_/ \_\_| \___\__,_|\__,_|\___| Criado por Bruno da Silva e Robson ([iPs]DraKiNs & [S]trong) www.ips-team.blogpsot.com Desenvolvimento Geral: Modo de jogo em geral criado e idealizado por Bruno e Robson. Agradecimentos a: Diogo Bras - Ajuda com base no teste do código */ //====================== [ Diretivas ] ========================================= #include a_samp #include a_sii #define SERVIDOR_MODE "(Arcade) (Death Match)" #undef MAX_PLAYERS #undef MAX_PICKUPS #define MAX_PLAYERS (32) #define MAX_RANK (5) #define MAX_PICKUPS (90) #define ContaPlayer "Contas/%s.ini" #define DialogLogin (006) #define DialogRegistro (007) #define COLOR_LIGHTGREEN 0xB8FF00FF #define COLOR_GREYGREEN 0xCCDD66FF #define COLOR_DARKBLUE 0x9966FFFF #define COLOR_PEPPER 0xDD3333FF #define COLOR_YELLOW 0xFFEA00FF #define COLOR_ORANGE 0xFAAB00FF #define COLOR_WHITE 0xFFFFFFFF #define COLOR_RED 0xFF0000FF #define cmd(%1,%2,%3) @%1(%2,%3); public @%1(%2,%3) #define TRACAR_SERVIDOR 0 //====================== [ Declarações ] ======================================= checarPause(); iniciarSistema(); tirarSpawnKill(i); atualizarContagem(); MoveCamera(playerid,rand); DestroyPickupEx(pickupid); forward OnPlayerSyncronize(playerid); enum pInfo { bool:SpawnDance, Float:SpawnAngle, SpawnTimer }; new selecaoFechada[MAX_PLAYERS char], SkinClass[MAX_PLAYERS char][pInfo] ; new string_contar[50], totalContagem; new Float:cordinatex, Float:cordinatey, Float:cordinatez, Float:cordinateangle; new Float:pedirCameraSpawn[9][4] = { {1296.4391,1583.2622,50.2969,317.8491}, {1054.8481,1019.7778,57.3438,95.0108}, {1452.0229,750.9430,32.6900,88.4309}, {2213.8701,1679.2406,57.3038,91.4144 }, {746.1910,740.3755,29.1076,24.4488}, {199.7275,1393.2085,47.8297,179.5663}, {596.4931,1502.9486,9.0578,29.4318}, {-207.8227,1901.1121,128.4624,68.0533}, {-2387.3440,2401.0579,20.7627,240.9129} }; new Text:introTextDraw1, Text:introTextDraw2, Text:introTextDraw3, Text:introTextDraw4, Text:introTextDraw5; new nicksProibido[][MAX_PLAYER_NAME] = { "com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7","lpt8","lpt9", "Carl","Rocky","Sony","clock$","prn","nul","con", "Azucar","CON","con","con1","aux","aux1","prn","PRN","AUX" }; enum PlayerData { sync, spree, kills, deaths, pontos, updatetime, bool:paused } new maximoAreas = 0, gangZoneAtual = 0, circuitoArquivo = 0, Text:tempoAtualRound, jogadoresConectados = 0, armaPickup[MAX_PICKUPS], jogadoresLoop[MAX_PLAYERS], Float:posicoesAreas[4000][4], armamentoPickup[MAX_PICKUPS], pickupFerramentas[MAX_PICKUPS], Text3D:atacarTexto[MAX_PLAYERS], Float:armazenarAreaAtual[400][4], bool:jogadorNoRanking[MAX_PLAYERS], PlayerInfo[MAX_PLAYERS][PlayerData], jogadorRanking[MAX_RANK] = {-1, ...}, jogadorRankingID[MAX_PLAYERS] = {-1, ...}; //====================== [ Variaveis Públicas ] ================================ public OnGameModeExit() { TextDrawHideForAll(introTextDraw1); TextDrawDestroy(introTextDraw1); TextDrawHideForAll(introTextDraw2); TextDrawDestroy(introTextDraw2); TextDrawHideForAll(introTextDraw3); TextDrawDestroy(introTextDraw3); TextDrawHideForAll(introTextDraw4); TextDrawDestroy(introTextDraw4); TextDrawHideForAll(introTextDraw5); TextDrawDestroy(introTextDraw5); return true; } main() { new buuferArquivo[164], stringPosicao[3][46], divisoresAchados = 0; new File:lerArquivo = fopen("randomSpawn.txt", io_read); while(fread(lerArquivo, buuferArquivo)) { //reads the file line-by-line divisoresAchados = 0; for(new i; buuferArquivo[i]; i++) { if(buuferArquivo[i] == ',') { divisoresAchados++; } } if(divisoresAchados != 2) { continue; } split(buuferArquivo, stringPosicao, ','); posicoesAreas[circuitoArquivo][0] = floatstr(stringPosicao[0]), posicoesAreas[circuitoArquivo][1] = floatstr(stringPosicao[1]), posicoesAreas[circuitoArquivo][2] = floatstr(stringPosicao[2]), ++circuitoArquivo; } fclose(lerArquivo); state estadoServidor:destrancar; tempoAtualRound = TextDrawCreate(015, 333,!"Tempo: %02d/600"); TextDrawAlignment(tempoAtualRound,0); TextDrawBackgroundColor(tempoAtualRound,0x000000ff); TextDrawFont(tempoAtualRound,1); TextDrawLetterSize(tempoAtualRound,0.2999, 0.9); TextDrawBoxColor(tempoAtualRound,0x00000050); TextDrawColor(tempoAtualRound,0xffffffff); TextDrawSetOutline(tempoAtualRound,1); TextDrawSetProportional(tempoAtualRound,1); TextDrawSetShadow(tempoAtualRound,1); for(new skinAtual = 0; skinAtual != 300; skinAtual++) { if (IsValidSkin(skinAtual)) { AddPlayerClass(skinAtual, 2088.0701, 2074.0896, 10.8203, 273.3924, 3, 1, 0, 0, 0, 0); } continue; } introTextDraw1 = TextDrawCreate(240.000000, 83.000000, "GTA Arcade"); TextDrawBackgroundColor(introTextDraw1, 255); TextDrawFont(introTextDraw1, 1); TextDrawLetterSize(introTextDraw1, 0.789999, 2.200000); TextDrawColor(introTextDraw1, -1); TextDrawSetOutline(introTextDraw1, 1); TextDrawSetProportional(introTextDraw1, 1); introTextDraw2 = TextDrawCreate(654.000000, 0.000000, "."); TextDrawBackgroundColor(introTextDraw2, 255); TextDrawFont(introTextDraw2, 1); TextDrawLetterSize(introTextDraw2, 0.500000, 4.999997); TextDrawColor(introTextDraw2, -1); TextDrawSetOutline(introTextDraw2, 0); TextDrawSetProportional(introTextDraw2, 1); TextDrawSetShadow(introTextDraw2, 1); TextDrawUseBox(introTextDraw2, 1); TextDrawBoxColor(introTextDraw2, 255); TextDrawTextSize(introTextDraw2, -18.000000, 5.000000); introTextDraw3 = TextDrawCreate(654.000000, 408.000000, "a ~n~a"); TextDrawBackgroundColor(introTextDraw3, 255); TextDrawFont(introTextDraw3, 1); TextDrawLetterSize(introTextDraw3, 0.500000, 4.999997); TextDrawColor(introTextDraw3, -1); TextDrawSetOutline(introTextDraw3, 0); TextDrawSetProportional(introTextDraw3, 1); TextDrawSetShadow(introTextDraw3, 1); TextDrawUseBox(introTextDraw3, 1); TextDrawBoxColor(introTextDraw3, 255); TextDrawTextSize(introTextDraw3, -18.000000, 5.000000); introTextDraw4 = TextDrawCreate(206.000000, 429.000000, "www.ips-team.blogspot.com"); TextDrawBackgroundColor(introTextDraw4, 255); TextDrawFont(introTextDraw4, 1); TextDrawLetterSize(introTextDraw4, 0.420000, 1.300000); TextDrawColor(introTextDraw4, -1); TextDrawSetOutline(introTextDraw4, 0); TextDrawSetProportional(introTextDraw4, 1); TextDrawSetShadow(introTextDraw4, 1); introTextDraw5 = TextDrawCreate(199.000000, 189.000000, " "); TextDrawBackgroundColor(introTextDraw5, 255); TextDrawFont(introTextDraw5, 1); TextDrawLetterSize(introTextDraw5, 0.500000, 2.000000); TextDrawColor(introTextDraw5, -1); TextDrawSetOutline(introTextDraw5, 0); TextDrawSetProportional(introTextDraw5, 1); TextDrawSetShadow(introTextDraw5, 1); UsePlayerPedAnims(); SendRconCommand("mapname [iPs] TeaM"); SendRconCommand("gamemodetext [iPs]Arcade GameMode"); SendRconCommand("weburl www.ips-team.blogspot.com"); SendRconCommand("hostname Servidor Arcade » [iPs]TeaM - Entre Já!"); iniciarSistema(); atualizarContagem(); SetTimer("checarPause", 1000, true); new compilar[][] = {"\x?","\x?"}; #pragma unused compilar return true; } public OnPlayerConnect(playerid) <estadoServidor:destrancar> { for(new i; i != _:PlayerData; i++) { PlayerInfo[playerid][PlayerData:i] = 0; } for(new i; i != sizeof(nicksProibido); i++) { if(!strcmp(nicksProibido[i],GetPlayerNick(playerid),true)) { SendClientMessage(playerid,0xCC0000FF,"-OperServ- Seu nickname é inválido, você foi banido"); Ban(playerid); } continue; } selecaoFechada{playerid} =0; ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"RAPPING","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"ON_LOOKERS","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"PARK","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"INT_HOUSE","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0); SkinClass[playerid][SpawnDance] = true; ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); return jogadoresLoop[jogadoresConectados++] = playerid, SetTimerEx("mostrarDialog", 800, false, "d", playerid); } mostrarDialog(playerid); public mostrarDialog(playerid) { static pName[128]; SendDeathMessage(255,playerid,200); format(pName, 54, ContaPlayer, GetPlayerNick(playerid)); if(!fexist(pName)) { format(pName, sizeof(pName), "{CCCCCC}Bem vindo ao Arcade [iPs]TeaM (DM) 1.0\nA conta {999933}%s{CCCCCC} não está registrada\nPor favor insira uma senha para registrá-la:", GetPlayerNick(playerid)); ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_INPUT, "Cadastrar", pName, "Continuar", "Cancelar"); } else { format(pName, sizeof(pName), "{CCCCCC}Bem vindo ao Arcade [iPs]TeaM (DM) 1.0\nA conta {999933}%s{CCCCCC} está registrada\nPor favor insira a sua senha para autenticar:", GetPlayerNick(playerid)); ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, "Autenticar Conta de Usuário", pName, "Autenticar", "Cancelar"); } return true; } public OnPlayerDisconnect(playerid, reason) { if (!IsPlayerNPC(playerid)) { for (new i; i < jogadoresConectados; i++) if (jogadoresLoop[i] == playerid) { jogadoresConectados--; jogadoresLoop[i] = jogadoresLoop[jogadoresConectados]; break; } } SendDeathMessage(255,playerid,201); static pName[128]; format(pName, 54, ContaPlayer, GetPlayerNick(playerid)); if(!fexist(pName)) return false; INI_Open(pName); INI_WriteInt("Kills", PlayerInfo[playerid][kills]); INI_WriteInt("Deaths", PlayerInfo[playerid][deaths]); INI_WriteInt("Score", PlayerInfo[playerid][pontos]); INI_Save(); return INI_Close(), true; } //============================================================================== public OnPlayerSpawn(playerid) { if(!PlayerInfo[playerid][sync]) { TextDrawShowForPlayer(playerid, tempoAtualRound); SetPlayerHealth(playerid, Float:0x7F800000); SendClientMessage(playerid,COLOR_YELLOW, "-InfoServ- Aproveite, você tem 5 segundos de Anti Spawn Kill."); new randomPos = random(maximoAreas); SetPlayerPos(playerid, armazenarAreaAtual[randomPos][0], armazenarAreaAtual[randomPos][1], armazenarAreaAtual[randomPos][2] + 1.5); SetTimerEx("tirarSpawnKill", 5000, false, "i", playerid); } else PlayerInfo[playerid][sync] = false; TextDrawHideForPlayer(playerid, introTextDraw1); TextDrawHideForPlayer(playerid, introTextDraw2); TextDrawHideForPlayer(playerid, introTextDraw3); TextDrawHideForPlayer(playerid, introTextDraw4); TextDrawHideForPlayer(playerid, introTextDraw5); TextDrawHideForPlayer(playerid, tempoAtualRound); TextDrawShowForPlayer(playerid, tempoAtualRound); selecaoFechada{playerid} =0; SkinClass[playerid][SpawnAngle] = 0.0; SkinClass[playerid][SpawnDance] = true; KillTimer( SkinClass[playerid][SpawnTimer] ); SetCameraBehindPlayer(playerid); return PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); } public OnPlayerRequestClass(playerid, classid) { PlayerPlaySound(playerid,1076,0.0,0.0,0.0); SetPlayerTime(playerid,23,0); SetPlayerWeather(playerid,15); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid, -1, # ); SendClientMessage(playerid,COLOR_DARKBLUE,"Seja bem vindo ao servidor [iPs]TeaM " SERVIDOR_MODE); SendClientMessage(playerid,COLOR_ORANGE,"Leia nossas regras com cuidado, você às encontra no /regras."); SendClientMessage(playerid,COLOR_YELLOW,"Digite /admins para ver a lista de administradores online."); SendClientMessage(playerid,COLOR_LIGHTGREEN,"Use /report para reportar jogadores que quebrem as regras."); SendClientMessage(playerid,COLOR_GREYGREEN,"Visite também o nosso blog www.ips-team.blogspot.com"); TextDrawShowForPlayer(playerid, introTextDraw1); TextDrawShowForPlayer(playerid, introTextDraw2); TextDrawShowForPlayer(playerid, introTextDraw3); TextDrawShowForPlayer(playerid, introTextDraw4); TextDrawShowForPlayer(playerid, introTextDraw5); if(selecaoFechada{playerid} == 0) { new rand = random(sizeof(pedirCameraSpawn)); cordinatex = pedirCameraSpawn[rand][0]; cordinatey = pedirCameraSpawn[rand][1]; cordinatez = pedirCameraSpawn[rand][2]; cordinateangle = pedirCameraSpawn[rand][3]; SetPlayerPos(playerid,cordinatex,cordinatey,cordinatez); SetPlayerFacingAngle(playerid, cordinateangle); SetPlayerCameraPos(playerid,cordinatex+(3.8*floatsin(-cordinateangle,degrees)),cordinatey+(3.8*floatcos(-cordinateangle,degrees)),cordinatez); SetPlayerCameraLookAt(playerid, cordinatex,cordinatey,cordinatez); ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238); if (SkinClass[playerid][SpawnDance]) SkinClass[playerid][SpawnTimer] = SetTimerEx("MoveCamera", 50, true, "i", playerid); SkinClass[playerid][SpawnDance] = false; } return true; } public OnPlayerDeath(playerid, killerid, reason) { static string[128]; GetPlayerName(killerid, string, MAX_PLAYER_NAME); if(IsPlayerConnected(killerid)) { SendDeathMessage(killerid, playerid, reason); SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); PlayerInfo[killerid][pontos]++; PlayerInfo[killerid][kills]++; PlayerInfo[playerid][deaths]++; PlayerInfo[killerid][spree]++, PlayerInfo[playerid][spree] = 0; format(string, 54, ContaPlayer, string); if(!fexist(string)) return false; INI_Open(string); INI_WriteInt("Kills", PlayerInfo[killerid][kills]); INI_WriteInt("Deaths", PlayerInfo[killerid][deaths]); INI_WriteInt("Score", PlayerInfo[killerid][pontos]); GetPlayerName(killerid, string, MAX_PLAYER_NAME); if(PlayerInfo[killerid][spree] > INI_ReadInt("Spree")) { INI_WriteInt("Spree",PlayerInfo[killerid][spree]); SendClientMessage(killerid, 0x00FFFFFF, "-DeathServ- Você acaba de conseguir bater seu recorde de kills seguidos "); } switch (PlayerInfo[killerid][spree]) { case 3: { format(string, 128, "-DeathServ- %s [%d] acaba de matar 3 seguidos (Owned)", string, killerid); SendClientMessageToAll(0x00FFFFFF, string); GameTextForPlayer(killerid, "~r~Owned" ,5000,6); } case 6: { format(string, 128, "-DeathServ- %s [%d] acaba de matar 6 seguidos (Pwned)", string, killerid); SendClientMessageToAll(0x00FFFFFF, string); GameTextForPlayer(killerid, "~r~Pwned" ,5000,6); } case 9: { format(string, 128, "-DeathServ- %s [%d] acaba de matar 9 seguidos (Mito)", string, killerid); SendClientMessageToAll(0x00FFFFFF, string); GameTextForPlayer(killerid, "~r~Mito" ,5000,6); } case 12: { format(string, 128, "-DeathServ- %s [%d] acaba de matar 12 seguidos (Serial Killer)", string, killerid); SendClientMessageToAll(0x00FFFFFF, string); GameTextForPlayer(killerid, "~r~Serial Killer" ,5000,6); } case 17: { format(string, 128, "-DeathServ- %s [%d] acaba de matar 17 seguidos (God Like)", string, killerid); SendClientMessageToAll(0x00FFFFFF, string); GameTextForPlayer(killerid, "~r~God Like" ,5000,6); } case 25: { format(string, 128, "-DeathServ- %s [%d] acaba de matar 25 seguidos (Chuck Norris)", string, killerid); SendClientMessageToAll(0x00FFFFFF, string); GameTextForPlayer(killerid, "~r~Chuck Norris" ,5000,6); } } } INI_Save(); INI_Close(); SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); new informacaoArma[4], Float:coordenadaPickup[5]; GetPlayerPos(playerid,coordenadaPickup[0],coordenadaPickup[1],coordenadaPickup[2]); GetPlayerFacingAngle(playerid,coordenadaPickup[3]); for(new x = 0; x < 13; x++) { GetPlayerWeaponData(playerid,x,informacaoArma[0],informacaoArma[1]); if(informacaoArma[0] != 0 && informacaoArma[1] > 0) { switch(informacaoArma[0]) { case 1: informacaoArma[2] = 331; case 2..8: informacaoArma[2] = informacaoArma[0]+331; case 9: informacaoArma[2] = 341; case 10..15: informacaoArma[2] = informacaoArma[0]+311; case 16..18: informacaoArma[2] = informacaoArma[0]+326; case 22..29: informacaoArma[2] = informacaoArma[0]+324; case 30,31: informacaoArma[2] = informacaoArma[0]+325; case 32: informacaoArma[2] = 372; case 33..45: informacaoArma[2] = informacaoArma[0]+324; case 46: informacaoArma[2] = 371; } informacaoArma[3] = CreatePickup(informacaoArma[2],3,coordenadaPickup[0]+ ( random( 10 ) * floatsin(-coordenadaPickup[4], degrees ) ),coordenadaPickup[1]+ ( random( 10 ) * floatcos( -coordenadaPickup[4], degrees ) ),coordenadaPickup[2],-1); armaPickup[informacaoArma[3]] = informacaoArma[0]; pickupFerramentas[informacaoArma[3]] = informacaoArma[1]; armamentoPickup[informacaoArma[3]] = SetTimerEx("DestroyPickupEx",15000,false,"i",informacaoArma[3]); coordenadaPickup[4] = random(360); } } format(string, 54, ContaPlayer, GetPlayerNick(playerid)); if(!fexist(string)) return false; INI_Open(string); INI_WriteInt("Kills", PlayerInfo[playerid][kills]); INI_WriteInt("Deaths", PlayerInfo[playerid][deaths]); INI_WriteInt("Score", PlayerInfo[playerid][pontos]); INI_Save(); INI_Close(); informacaoArma[3] = CreatePickup(1240,1,coordenadaPickup[0],coordenadaPickup[1],coordenadaPickup[2],-1); armamentoPickup[informacaoArma[3]] = SetTimerEx("DestroyPickupEx",15000,false,"i",informacaoArma[3]); return true; } public OnPlayerPickUpPickup(playerid,pickupid) { if(!armaPickup[pickupid]) { static Float:Health; GetPlayerHealth(playerid,Health); Health = Health > 69 ? SetPlayerHealth(playerid,100) : SetPlayerHealth(playerid,Health+30); DestroyPickup(pickupid); } else { SetPlayerAmmo(playerid,armaPickup[pickupid],0); GivePlayerWeapon(playerid,armaPickup[pickupid],pickupFerramentas[pickupid]); KillTimer(armamentoPickup[pickupid]); armaPickup[pickupid] = 0; pickupFerramentas[pickupid] = 0; DestroyPickup(pickupid); } return true; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DialogRegistro) { if(response) { static pName[128]; if(!inputtext[3]) { format(pName, sizeof(pName), "{CCCCCC}\nA conta {999933}%s{CCCCCC} não está registrada\nPor favor insira uma senha para registrá-la:", GetPlayerNick(playerid)); return ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_INPUT, "Cadastrar", pName, "Continuar", "Cancelar"); } format(pName, 54, ContaPlayer, GetPlayerNick(playerid)); CriarArquivo(pName); INI_Open(pName); INI_WriteString("Senha", inputtext); INI_WriteInt("Kills", false); INI_WriteInt("Deaths", false); INI_WriteInt("Admin", false); INI_WriteInt("Score", false); INI_Save(); return INI_Close(); } SendClientMessage(playerid,COLOR_PEPPER,"-WarnServ- A senha digita é inválida, você foi desconectado."); return Kick(playerid), true; } if(dialogid == DialogLogin) { if(response) { static pName[128]; format(pName, 54, ContaPlayer, GetPlayerNick(playerid)); if(strlen(inputtext) <3) { SendClientMessage(playerid,COLOR_PEPPER,"-WarnServ- A senha digita é inválida, favor digite-a corretamente."); format(pName, sizeof(pName), "{CCCCCC}\nA conta {999933}%s{CCCCCC} está registrada\nPor favor insira uma senha para autenticar a mesma:", GetPlayerNick(playerid)); return ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, "Autenticar conta de usuário", pName, "Continuar", "Cancelar"); } INI_Open(pName); new password[128]; if(INI_ReadString(password, "Senha", MAX_PLAYER_NAME) && !strcmp(password, inputtext, true)) { PlayerInfo[playerid][pontos] = INI_ReadInt("Score"); PlayerInfo[playerid][deaths] = INI_ReadInt("Deaths"); PlayerInfo[playerid][kills] = INI_ReadInt("Kills"); SendClientMessage(playerid,COLOR_LIGHTGREEN,"-InfoServ- Você foi logado com sucesso!"); } else { SendClientMessage(playerid,COLOR_PEPPER,"-WarnServ- A senha digita é inválida, favor digite-a corretamente."); format(pName, sizeof(pName), "{CCCCCC}\nA conta {999933}%s{CCCCCC} está registrada\nPor favor insira uma senha para autenticar a mesma:", GetPlayerNick(playerid)); ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, "Autenticar conta de usuário", pName, "Continuar", "Cancelar"); } INI_Close(); } else { SendClientMessage(playerid,COLOR_PEPPER,"-WarnServ- Obrigatório digitar a senha, você foi desconectado."); PlayerPlaySound(playerid,1085,0.0,0.0,0.0); return Kick(playerid), true; } } return false; } public OnPlayerUpdate(playerid) <estadoServidor:destrancar> { PlayerInfo[playerid][updatetime] = gettime(); static Float:Health; ResetPlayerMoney(playerid); GetPlayerHealth(playerid,Health); return GivePlayerMoney(playerid, -floatround(Health)), true; } //========================= [ Comandos ] ======================================= new paramNumero, paramExecute, paramTexto[128] ; #define isnull(%1,%2) ((!(%1[%2])) || (((%1[%2]) == '\1') && (!(%1[%2+1])))) public OnPlayerCommandText(playerid, cmdtext[]) <estadoServidor:destrancar> { state (!strcmp(cmdtext, "/estado-servidor", true) && IsPlayerAdmin(playerid)) estadoServidor:trancar; if(!strcmp("/morrer", cmdtext, true)) { SendClientMessage(playerid,0xFF8000FF, "-InfoServ- Você acaba de se suicidar."); return SetPlayerHealth(playerid, 0.0), true; } if(!strcmp("/offline", cmdtext, true)) { if(!PlayerInfo[playerid][paused]) { TogglePlayerControllable(playerid, false); atacarTexto[playerid] = Create3DTextLabel("Jogador Offline", 0xFFFF00AA, 30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(atacarTexto[playerid], playerid, 0.0, 0.0, 0.7); static string[128]; format(string, 128, "-InfoServ- O Jogador %s (%d) está ausente (/online)", GetPlayerNick(playerid), playerid); SendClientMessageToAll(0xFF8000FF, string); PlayerInfo[playerid][paused] = true; } return true; } if(!strcmp("/online", cmdtext, true)) { if(PlayerInfo[playerid][paused]) { TogglePlayerControllable(playerid, true); static string[128]; format(string, 128, "-InfoServ- O Jogador %s (%d) está online (/offline)", GetPlayerNick(playerid), playerid); SendClientMessageToAll(0xFF8000FF, string); Delete3DTextLabel(atacarTexto[playerid]); PlayerInfo[playerid][paused] = false; } return true; } if(!strcmp("/spawn", cmdtext, true)) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Você não é um administrador."); static Float:xPos, Float:yPos, Float:zPos, string[128] ; GetPlayerPos(playerid, xPos, yPos, zPos); new File:arquivo = fopen("randomSpawn.txt", io_append); format(string, 128, "\r\n%f, %f, %f", xPos, yPos, zPos); fwrite(arquivo, string); fclose(arquivo); format(string, 128, "-InfoServer- Você salvou uma posição no nome de %s ", GetPlayerNick(playerid)); SendClientMessage(playerid,0xFF8000FF,string); return true; } if(!strcmp("/sync", cmdtext, true)) { OnPlayerSyncronize(playerid); SendClientMessage(playerid,0xFF8000FF, "-InfoServ- Sincronizado com sucesso"); return true; } if(!strcmp("/admins", cmdtext, true)) { static string[128]; SendClientMessage(playerid, 0xFFFFFFFF, "Procurando Administradores Online . . ."); for(new j = 1, i = jogadoresLoop[0]; j != jogadoresConectados+1; i = jogadoresLoop[j], j++) { if(IsPlayerAdmin(playerid)) { GetPlayerName(i, string, MAX_PLAYER_NAME); format(string, 128, "[%i] Administrador %s", i,string); SendClientMessage(playerid, 0xFFFFFFFF, string); } } return true; } if(!strcmp("/admcmds", cmdtext, true)) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Você não é um administrador."); return SendClientMessage(playerid, 0xFFFFFFFF, " /score \n /matar \n /vida \n /colete \n /kick \n /banir \n /mudarround \n /spawn \n"); } if(!strcmp("/mudarround", cmdtext, true)) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Você não é um administrador."); return totalContagem = 600, SendClientMessageToAll(0xFFFFFFFF, " - InfoServ - Um administrador alterou o round"); } if(!strcmp("/cmds", cmdtext, true)) { return SendClientMessage(playerid, COLOR_YELLOW, " /morrer \n /status \n /admins \n /sync \n /cmds\n"); } new cmdname[32], cmdindex; while(cmdtext[cmdindex++] > ' ') { cmdname[cmdindex- 1] = tolower(cmdtext[cmdindex]); } format(cmdname, sizeof(cmdname), "@%s", cmdname); if(funcidx(cmdname) != -1) { return cmdtext[cmdindex] ? CallLocalFunction(cmdname, "ds", playerid, cmdtext[cmdindex + 1]) : CallLocalFunction(cmdname, "ds", playerid, "\1") ; } return SendClientMessage(playerid,0xCC0000FF, "-WarnServ- O comando digitado é inválido. Tente /comandos."); } cmd(score, playerid, params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Você não é um administrador."); if(!sscanf(params, "ui", paramNumero, paramExecute)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Digite /score <id> <score>"); if(!IsPlayerConnected(paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Jogador encontra-se offline"); SendClientMessage(paramNumero, 0xFF8000FF, "-InfoServ- O seu score foi alterado por um administrador."); return SetPlayerScore(paramNumero, paramExecute), SendClientMessage(playerid, 0xFF8000FF, "-InfoServ- O score do jogador foi alterado com sucesso."); } cmd(matar, playerid, params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Para executar este comando precisa ser administrador"); if(!sscanf(params, "u", paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Digite /matar <id>"); if(!IsPlayerConnected(paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Jogador encontra-se offline"); SendClientMessage(paramNumero, 0xFF8000FF, "-InfoServ- Morto por um administrador"); return SetPlayerHealth(paramNumero, 0.0); } cmd(status, playerid, params[]) { if(!sscanf(params, "u", paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Digite /status <id>"); if(!IsPlayerConnected(paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Jogador encontra-se offline"); static string[128]; format(string, 128, "Vida: %d - Total: %d - Score Round: %d - Matou %d - Morreu %d - Spree %d", ~GetPlayerMoney(paramNumero), PlayerInfo[paramNumero][pontos], GetPlayerScore(paramNumero), PlayerInfo[paramNumero][kills], PlayerInfo[paramNumero][deaths], PlayerInfo[paramNumero][spree]); return SendClientMessage(playerid,0xFF8000FF, string); } cmd(pm, playerid, params[]) { paramTexto[0] = EOS; if(!sscanf(params, "us", paramNumero,paramTexto)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Digite /pm <id> <msg>"); if(!IsPlayerConnected(paramNumero) || IsPlayerNPC(paramNumero) || paramNumero == playerid) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Jogador encontra-se offline"); PlayerPlaySound(paramNumero, 1057, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "MENSAGEM PRIVADA ~b~ENVIADA", 2500, 3); format(paramTexto, 128, "-PrivateServ- %s diz para %s: %s", GetPlayerNick(playerid),GetPlayerNick(paramNumero), paramTexto); SendClientMessage(paramNumero, 0xCC0000FF, paramTexto); SendClientMessage(playerid, 0xCC0000FF, paramTexto); PlayerPlaySound(paramNumero, 1057, 0.0, 0.0, 0.0); GameTextForPlayer(paramNumero, "MENSAGEM PRIVADA ~b~RECEBIDA", 2500, 3); return true; } cmd(vida, playerid, params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Para executar este comando precisa ser administrador"); if(!sscanf(params, "ud", paramNumero, paramExecute)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Digite /vida <id> <quantia>"); if(!IsPlayerConnected(paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Jogador encontra-se offline"); SendClientMessage(paramNumero, 0xFF8000FF, "-InfoServ- Sua vida foi mudada por um administrador"); return SetPlayerHealth(paramNumero, paramExecute); } cmd(colete, playerid, params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Para executar este comando precisa ser administrador"); if(!sscanf(params, "ud", paramNumero, paramExecute)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Digite /colete <id> <quantia>"); if(!IsPlayerConnected(paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Jogador encontra-se offline"); SendClientMessage(paramNumero, 0xFF8000FF, "-InfoServ- Seu colete foi mudado por um administrador"); return SetPlayerArmour(paramNumero, paramExecute); } cmd(banir, playerid, params[]) { paramTexto[0] = EOS; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Para executar este comando precisa ser administrador"); if(!sscanf(params, "us", paramNumero, paramTexto)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Digite /banir <id> <motivo>"); if(!IsPlayerConnected(paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Jogador encontra-se offline"); format(paramTexto, 128, "-OperServ- %s foi banido por um administrador | Motivo de %s", GetPlayerNick(paramNumero), paramTexto); SendClientMessageToAll(0xCC0000FF, paramTexto); return BanEx(paramNumero,paramTexto); } cmd(kick, playerid, params[]) { paramTexto[0] = EOS; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Para executar este comando precisa ser administrador"); if(!sscanf(params, "us", paramNumero, paramTexto)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Digite /kick <id> <motivo>"); if(!IsPlayerConnected(paramNumero)) return SendClientMessage(playerid, 0xCC0000FF, "-WarnServ- Jogador encontra-se offline"); format(paramTexto, 128, "-OperServ- %s foi kickado por um administrador | Motivo de %s", GetPlayerNick(paramNumero), paramTexto); SendClientMessageToAll(0xCC0000FF, paramTexto); return Kick(paramNumero); } //============================================================================== IsValidSkin(skinid) { new skinInvalida[22] = {3, 4, 5, 6, 8, 42, 65, 74,86,119, 149, 208, 273, 289}; if (skinid < 0 || skinid > 299) { return false; } for (new i = 0; i != 22; ++i) { if (skinid == skinInvalida[i]) { return false; } continue; } return true; } public tirarSpawnKill(i) { GivePlayerWeapon(i, 4, 800); GivePlayerWeapon(i, 16, 1); GivePlayerWeapon(i, 25, 800); GivePlayerWeapon(i, 34, 800); GivePlayerWeapon(i, 24, 800); SetPlayerHealth(i, 100.0); SendClientMessage(i,0xFF8000FF, "-InfoServ- O AntiSpawnKill terminou!"); return true; } public MoveCamera(playerid,rand) { SetPlayerCameraPos(playerid, cordinatex - 2 * floatsin(-SkinClass[playerid][SpawnAngle], degrees), cordinatey - 10 * floatcos(-SkinClass[playerid][SpawnAngle], degrees), cordinatez + 3); SetPlayerCameraLookAt(playerid, cordinatex, cordinatey, cordinatez + 0.5); SkinClass[playerid][SpawnAngle] += 0.5; if (SkinClass[playerid][SpawnAngle] >=360.0) { SkinClass[playerid][SpawnAngle] = 0.0; } return true; } public OnPlayerSyncronize(playerid) { PlayerInfo[playerid][sync] = true; new PlayerWeapons[2][13]; for(new i = 0; i < 13; i++) { if(i == 0 || i == 1) { GetPlayerWeaponData(playerid,i,PlayerWeapons[0][i],PlayerWeapons[1][i]); if(PlayerWeapons[1][i] > 1) { PlayerWeapons[1][i] = 1; } } else { GetPlayerWeaponData(playerid,i,PlayerWeapons[0][i],PlayerWeapons[1][i]); } } ClearAnimations(playerid); new Float:PlayerPos[3]; GetPlayerPos(playerid,PlayerPos[0],PlayerPos[1],PlayerPos[2]); new Float:health ; GetPlayerHealth(playerid,health); new TheInterior, VirtualWorld; new Float:Angle; GetPlayerFacingAngle(playerid, Angle); TheInterior = GetPlayerInterior(playerid); VirtualWorld = GetPlayerVirtualWorld(playerid); OnPlayerSpawn(playerid); SetPlayerWorldBounds(playerid,9999.9,-9999.9,9999.9,-9999.9); ResetPlayerWeapons(playerid); SetPlayerHealth(playerid,health); SetPlayerInterior(playerid,TheInterior); SetPlayerVirtualWorld(playerid,VirtualWorld); SetPlayerPos(playerid,PlayerPos[0],PlayerPos[1],PlayerPos[2]); for(new i = 0; i < 13; i++) { if(PlayerWeapons[0][i] > 0) { GivePlayerWeapon(playerid,PlayerWeapons[0][i],PlayerWeapons[1][i]); } } return true; } public DestroyPickupEx(pickupid) { DestroyPickup(pickupid); armaPickup[pickupid] = 0; return pickupFerramentas[pickupid] = 0; } public checarPause() { for(new j = 1, i = jogadoresLoop[0]; j != jogadoresConectados+1; i = jogadoresLoop[j], j++) { if(GetPlayerState(i) && GetPlayerState(i) != 7 && !PlayerInfo[i][paused] && (GetPlayerPing(i) / 1000) < (gettime() - PlayerInfo[i][updatetime]) > 3) { return CallRemoteFunction("OnPlayerCommandText", "is", i, "/offline"); } if(PlayerInfo[i][paused] && (gettime() - PlayerInfo[i][updatetime]) < 3) { return CallRemoteFunction("OnPlayerCommandText", "is", i, "/online"); } } return true; } public iniciarSistema() { selecionarOutraArea: gangZoneAtual = random(circuitoArquivo); maximoAreas = 0; if(!posicoesAreas[gangZoneAtual][0]) goto selecionarOutraArea; for(new i; i != sizeof(posicoesAreas); i++) { if((posicoesAreas[i][0] && posicoesAreas[i][1]) && IsPointInRangeOfPoint(posicoesAreas[i][0], posicoesAreas[i][1], posicoesAreas[i][2], posicoesAreas[gangZoneAtual][0], posicoesAreas[gangZoneAtual][1],posicoesAreas[gangZoneAtual][2],150.0)) { armazenarAreaAtual[maximoAreas][0] = posicoesAreas[i][0]; armazenarAreaAtual[maximoAreas][1] = posicoesAreas[i][1]; armazenarAreaAtual[maximoAreas][2] = posicoesAreas[i][2]; maximoAreas++; } } if(maximoAreas < 5) goto selecionarOutraArea; printf("NOVA AREA INICIADA (id: %d/%d) (numero de spawns: %d) ", gangZoneAtual, circuitoArquivo, maximoAreas); static string[128]; SendClientMessageToAll(COLOR_LIGHTGREEN, "-InfoServer- Gerando o ranking da rodada, veja abaixo:"); for(new x = 0 ; x != MAX_RANK; ++x) { for(new j = 1, i = jogadoresLoop[0]; j != jogadoresConectados+1; i = jogadoresLoop[j], j++) { if(!jogadorNoRanking[i] && GetPlayerScore(i) > jogadorRanking[x]) { if(jogadorRankingID[x] != -1) jogadorNoRanking[jogadorRankingID[x]] = false; jogadorRanking[x] = GetPlayerScore(i); jogadorRankingID[x] = i; jogadorNoRanking[i] = true; } } if(jogadorRankingID[x] != -1) { format(string, 128, "Colocação: [%02i] Jogador: %024s (%04d)",x+1, GetPlayerNick(jogadorRankingID[x]),GetPlayerScore(jogadorRankingID[x])); SendClientMessageToAll(0xF060B3FF, string); } } for(new j = 1, i = jogadoresLoop[0]; j != jogadoresConectados+1; i = jogadoresLoop[j], j++) { GivePlayerWeapon(i, 4, 800); GivePlayerWeapon(i, 16, 1); GivePlayerWeapon(i, 25, 800); GivePlayerWeapon(i, 34, 800); GivePlayerWeapon(i, 24, 800); SetPlayerHealth(i, 100.0); SetPlayerScore(i, 0); jogadorNoRanking[i] = false; jogadorRankingID[i] = -1; jogadorRanking[i] = -1; new randomPos = random(maximoAreas); SetPlayerPos(i, armazenarAreaAtual[randomPos][0], armazenarAreaAtual[randomPos][1], armazenarAreaAtual[randomPos][2] + 1.5); SetPlayerPos(i, armazenarAreaAtual[randomPos][0], armazenarAreaAtual[randomPos][1], armazenarAreaAtual[randomPos][2] + 1.5); } return true; } public atualizarContagem() { format(string_contar, sizeof(string_contar), "Tempo~g~: ~r~%03i~w~/600", totalContagem++); TextDrawSetString(tempoAtualRound, string_contar); if(totalContagem < 600) { SetTimer("atualizarContagem", 888, false); } else { SetTimer("atualizarContagem", 888, false); totalContagem = 0; iniciarSistema(); } return true; } //======================= [ Automaton ] ======================================== public OnPlayerCommandText(playerid, cmdtext[]) <estadoServidor:trancar> { state (!strcmp(cmdtext, "/estado-servidor", true) && IsPlayerAdmin(playerid)) estadoServidor:destrancar; return false; } public OnPlayerConnect(playerid) <estadoServidor:trancar> { SendClientMessage(playerid,0x7E7EFBFF, "-LockServ- Desculpe o servidor está trancado, contate um administrador"); return Kick(playerid); } public OnPlayerUpdate(playerid) <estadoServidor:trancar> { SendClientMessage(playerid,0x7E7EFBFF, "-LockServ- Desculpe o servidor está trancado,, contate um administrador"); return Kick(playerid); } /* ================== [ Funções ] ============================================== @ sscanf adaptada para o sevidor @ Criado por Bruno da Silva @ sscanf(input[], format[], varsoutput) - Input Colocar a string para ser dividida conforme o format - Formato Formato para o destino das divisões da string - varsoutput variáveis/arrays para destino Formatações: Ainda não tem todas formatações, apenas as principais: "s" string "z" string "d" numeros "i" numeros "u" jogadores por nome ou id @ Criado dia 14 de agosto de 2011 @ www.ips-team.blogspot.com */ sscanf(string[], formats[],{Float,_} :...) { if((!string[0] || string[0] == '\1' && !string[1]) || (!formats[0] || formats[0] == '\1' && !formats[1])||numargs()-2 != strlen(formats)) return false; new ultimoCaractere = 0; for(new f; formats[f]; f++) { switch(formats[f]) { case 'i','d': { new i = ultimoCaractere, valorArmazenar = 0; for( ; string[i] > ' '; ++i) { if(('0' <= string[i] <= '9')) { valorArmazenar = (valorArmazenar * 10) + (string[i] - '0'); } else if(string[i] != '-') { return false; } } setarg(f + 2, 0, string[ultimoCaractere] == '-' ? ~valorArmazenar + 1 : valorArmazenar ); ultimoCaractere = i + 1; } case 's','z': { new i = ultimoCaractere; for( ; string[i] > ' '; i++) { setarg(f + 2, i - ultimoCaractere, string[i]); } ultimoCaractere = i + 1; } case 'u', 'j': { new i = ultimoCaractere, nomeJogador[MAX_PLAYER_NAME], jogadorDigitado = 0, bool:isNumeric = true; for( ; string[i] > ' '; i++) { if ('0' <= string[i] <= '9') { jogadorDigitado = (jogadorDigitado * 10) + (string[i] - '0'); } else { isNumeric = false; } } if (isNumeric && IsPlayerConnected(jogadorDigitado)) { setarg(f + 2, 0, jogadorDigitado); } else { strcat(nomeJogador, string[ultimoCaractere], MAX_PLAYER_NAME); jogadorDigitado = GetPlayerByPartName(nomeJogador); setarg(f + 2, 0, jogadorDigitado); } ultimoCaractere = i; } } } return true; } /* @ GetPlayerByPartName @ Função: Retorna o id do jogador através de uma parte do nome do mesmo @ GetPlayerByPartName(partedonome) - partedonome Parte do nome para ser buscado o jogador, caso não encontrar retorna INVALID PLAYER @ Criado por Bruno da Silva */ GetPlayerByPartName(sNome[]) { if (strlen(sNome) < 3) return INVALID_PLAYER_ID; static sName[MAX_PLAYER_NAME]; for (new j = 1, i = jogadoresLoop[0]; j != jogadoresConectados + 1; i = jogadoresLoop[j], j++) { GetPlayerName(i, sName, MAX_PLAYER_NAME); if (strfind(sName, sNome, true)) { return i; } } return INVALID_PLAYER_ID; } /* @ GetPlayerNick @ Função: Retorna o nome de um jogador através do id do mesmo @ GetPlayerNick(player) - player id do jogador para retornar o nome @ Criado por Bruno da Silva */ GetPlayerNick(player) { static name[MAX_PLAYER_NAME]; GetPlayerName(player, name, sizeof(name)); return name; } // split String to array multidimensional split(const strsrc[], strdest[][], delimiter) { new i, li; new aNum; new len; while(i <= strlen(strsrc)) { if(strsrc[i] == delimiter || i == strlen(strsrc)) { len = strmid(strdest[aNum], strsrc, li, i, 128); strdest[aNum][len] = 0, li = i+1, aNum++; } i++; continue; } return true; } IsPointInRangeOfPoint(Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2, Float:range) { x2 -= x, y2 -= y, z2 -= z; return 25.0 < ((x2 * x2) + (y2 * y2) + (z2 * z2)) < (range * range); } CriarArquivo(arquivo[]) { if(fexist(arquivo)) return false; new File:Arquivo = fopen(arquivo, io_write); return fclose(Arquivo); }
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
buscar-productos.blade.php
PHP | 1 hour ago | 2.44 KB
simple youtube video to product
PHP | 9 hours ago | 3.71 KB
greetings human
10 hours ago | 0.03 KB
OoT rando seed 6/1
16 hours ago | 68.21 KB
Geofencing - Lot of Rollover Budget
22 hours ago | 0.48 KB
Preface prompt for offline apps
1 day ago | 2.31 KB
Untitled
1 day ago | 5.42 KB
Secrets.kdbx
2 days ago | 166.19 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!