Sistema de Presentes


Sistema de Presentes !

Olá pessoal, venho trazer um FilterScript de Presentes.

Bom, eu dei uma pequena procurada no fórum e não achei nada parecido com oque estou trazendo a vocês.
Vamos lá, esse FS cria 5 objetos (Pode ser facilmente alterado) que são os presentes e, ao pegar algum, ganha-se prêmios (Me Gusta)

Comandos para Players.
•/PegarPresente - Pega o presente.

Comandos para Admins (Logados na Rcon)
•/DarPresentes - Solta os presentes
•/IrPresente - Teleporta até o Presente

Código:
pawn Code:
/*                             Sistema de Presentes V-1.2                             Este é um Sistema simples, ótimo para servidores RP ou RPG.                             Creditos: AnonymouSs - Criação                             Dicas/Ajuda: BlueX, Mandrack_Freeze                             Favor nao retirar os créditos :) */ //[Includes] #include <a_samp> #include <zcmd> #include <sscanf2> //[Variaveis] new Presentes[10]; new str[256]; new nome[MAX_PLAYER_NAME]; new bool:PresentesON; new bool:Presente1; new bool:Presente2; new bool:Presente3; new bool:Presente4; new bool:Presente5; new PresentesS; new Carro; //      Pos Randomicos dos Presentes new Float:PosP1[][3] = { // Presente 1     {1679.3547,764.7830,10.8203},     {1074.7871,1360.4675,10.8203},     {409.0438,2445.8823,16.5000},     {170.7376,1834.8569,17.6406},     {1565.9558,1680.5415,10.8203} }; new Float:PosP2[][3] = { // Presente 2     {410.3170,1165.4447,7.9069},     {676.3964,828.6520,-42.9609},     {1080.0352,1001.6307,11.0000},     {1336.1379,1919.2657,11.4609},     {1460.8502,2032.8099,10.8203} }; new Float:PosP3[][3] = { // Presente 3     {969.9153,2021.5613,11.3672},     {1124.3917,2031.7479,10.8203},     {1124.7054,1959.9232,24.9536},     {1059.3982,1864.8138,14.9297},     {937.2090,1747.9916,15.7941} }; new Float:PosP4[][3] = { // Presente 4     {1343.1893,1653.3903,10.8203},     {1292.0728,1579.5107,19.8637},     {1267.5626,1329.4642,10.8130},     {1432.0682,1098.9417,10.8203},     {1586.9862,1187.0731,38.0466} }; new Float:PosP5[][3] = { // Presente 5     {1714.5117,1317.8984,10.8203},     {1678.8364,1447.7605,47.7780},     {1659.1014,1727.3586,17.5223},     {1631.3134,1978.1212,10.8203},     {1681.2046,2108.9719,11.3667} }; //[Defines] //Mensagens #define Msg SendClientMessage #define MsgAll SendClientMessageToAll //----------------------------------------------------------------------------// public OnFilterScriptInit() {     print("\n--------------------------------------");     print(" Sistema de Presentes --- Carregado com Sucesso!");     print(" Sistema de Presentes --- Criado por: AnonymouSs");     print("--------------------------------------\n");     return 1; } public OnFilterScriptExit() {     if(Presente1 == false) DestroyObject(Presentes[0]);     if(Presente2 == false) DestroyObject(Presentes[1]);     if(Presente3 == false) DestroyObject(Presentes[2]);     if(Presente4 == false) DestroyObject(Presentes[3]);     if(Presente5 == false) DestroyObject(Presentes[4]);     DestroyVehicle(Carro);     return 1; } public OnPlayerConnect(playerid) {     Msg(playerid, -1, "{FFFF00}Sistema de Presentes By: [AnonymouSs]");     return 1; } CMD:darpresentes(playerid) {     GetPlayerName(playerid, nome, sizeof(nome));     if(PresentesON == false)     {         if(IsPlayerAdmin(playerid))         {             format(str, sizeof(str), "{FF0000}O Admin {0000FF} %s {FF0000} soltou os presentes pela cidade, corram!", nome);             MsgAll(-1, str);             PresentesON = true;             PresentesS = 5;             new Random1 = random(sizeof(PosP1));             new Random2 = random(sizeof(PosP2));             new Random3 = random(sizeof(PosP3));             new Random4 = random(sizeof(PosP4));             new Random5 = random(sizeof(PosP5));             Presentes[0] = CreateObject(19341, PosP1[Random1][0], PosP1[Random1][1], PosP1[Random1][2], 0.0, 0.0, 0.0);             Presentes[1] = CreateObject(19342, PosP2[Random2][0], PosP2[Random2][1], PosP2[Random2][2], 0.0, 0.0, 0.0);             Presentes[2] = CreateObject(19343, PosP3[Random3][0], PosP3[Random3][1], PosP3[Random3][2], 0.0, 0.0, 0.0);             Presentes[3] = CreateObject(19344, PosP4[Random4][0], PosP4[Random4][1], PosP4[Random4][2], 0.0, 0.0, 0.0);             Presentes[4] = CreateObject(19345, PosP5[Random5][0], PosP5[Random5][1], PosP5[Random5][2], 0.0, 0.0, 0.0);             Presente1 = false;             Presente2 = false;             Presente3 = false;             Presente4 = false;             Presente5 = false;         }         else         {             Msg(playerid, -1, "[FaiL] Você não é Admin!");         }     }     else     {         Msg(playerid, -1, "[FaiL]Já foram soltados os presentes, aguardem todos acabarem");     }     return 1; } CMD:pegarpresente(playerid) {     GetPlayerName(playerid, nome, sizeof(nome));     new Float:OP1[3], Float:OP2[3], Float:OP3[3], Float:OP4[3], Float:OP5[3];     GetObjectPos(Presentes[0], OP1[0], OP1[1], OP1[2]);     GetObjectPos(Presentes[1], OP2[0], OP2[1], OP2[2]);     GetObjectPos(Presentes[2], OP3[0], OP3[1], OP3[2]);     GetObjectPos(Presentes[3], OP4[0], OP4[1], OP4[2]);     GetObjectPos(Presentes[4], OP5[0], OP5[1], OP5[2]);     if(PresentesON == true)     {         if(IsPlayerInRangeOfPoint(playerid, 2.0, OP1[0], OP1[1], OP1[2]))         {             GivePlayerWeapon(playerid, 24, 999);             GivePlayerWeapon(playerid, 31, 999);             SetPlayerHealth(playerid, 200);             SetPlayerArmour(playerid, 200);             format(str, sizeof(str), "|Presentes|{FF0000} O jogador {0000FF}%s {FF0000}pegou o presente numero {0000FF}1{FF0000}, e ganhou um Kit Assassino", nome);             MsgAll(-1, str);             Presente1 = true;             DestroyObject(Presentes[0]);             PresentesS --;             if(PresentesS < 1)             {                 MsgAll(-1, "|Presentes| Ahhhh! Acabaram todos os presentes :(, aguarde mais :)");                 PresentesON = false;             }         }         else if(IsPlayerInRangeOfPoint(playerid, 2.0, OP2[0], OP2[1], OP2[2]))         {             SetPlayerSkin(playerid, 299);             format(str, sizeof(str), "|Presentes|{FF0000} O jogador {0000FF}%s {FF0000}pegou o presente numero {0000FF}2{FF0000}, e ganhou uma troca de Skin Grátis!", nome);             MsgAll(-1, str);             DestroyObject(Presentes[1]);             PresentesS --;             Presente2 = true;             if(PresentesS < 1)             {                 MsgAll(-1, "|Presentes| Ahhhh! Acabaram todos os presentes :(, aguarde mais :)");                 PresentesON = false;             }         }         else if(IsPlayerInRangeOfPoint(playerid, 2.0, OP3[0], OP3[1], OP3[2]))         {             SetPlayerHealth(playerid, 0);             format(str, sizeof(str), "|Presentes|{FF0000} O jogador {0000FF}%s {FF0000}pegou o presente numero {0000FF}3{FF0000}, e ganhou uma visita do senhor Morte!", nome);             MsgAll(-1, str);             Presente3 = true;             DestroyObject(Presentes[2]);             PresentesS --;             if(PresentesS < 1)             {                 MsgAll(-1, "|Presentes| Ahhhh! Acabaram todos os presentes :(, aguarde mais :)");                 PresentesON = false;             }         }         else if(IsPlayerInRangeOfPoint(playerid, 2.0, OP4[0], OP4[1], OP4[2]))         {             new Float:P[3], Float:Angulo;             GetPlayerPos(playerid, P[0], P[1], P[2]);             GetPlayerFacingAngle(playerid, Angulo);             Carro = CreateVehicle(522, P[0], P[1], P[2], Angulo, -1, -1, 60);             PutPlayerInVehicle(playerid, Carro, 0);             format(str, sizeof(str), "|Presentes|{FF0000} O jogador {0000FF}%s {FF0000}pegou o presente numero {0000FF}4{FF0000}, e ganhou uma motoca novinha!!", nome);             MsgAll(-1, str);             Presente4 = true;             DestroyObject(Presentes[3]);             PresentesS --;             if(PresentesS < 1)             {                 MsgAll(-1, "|Presentes| Ahhhh! Acabaram todos os presentes :(, aguarde mais :)");                 PresentesON = false;             }         }         else if(IsPlayerInRangeOfPoint(playerid, 2.0, OP5[0], OP5[1], OP5[2]))         {             new lvl = GetPlayerScore(playerid);             SetPlayerScore(playerid, lvl + 50);             format(str, sizeof(str), "|Presentes|{FF0000} O jogador {0000FF}%s {FF0000}pegou o presente numero {0000FF}5{FF0000}, e ganhou +50 de Score", nome);             MsgAll(-1, str);             Presente5 = true;             DestroyObject(Presentes[4]);             PresentesS --;             if(PresentesS < 1)             {                 MsgAll(-1, "|Presentes| Ahhhh! Acabaram todos os presentes :(, aguarde mais :)");                 PresentesON = false;             }         }         else         {             Msg(playerid, -1, "[FaiL]Você não está perto de um presente");         }     }     else     {         Msg(playerid, -1, "[FaiL]Não foram soltados presente no momento, aguarde.");     }     return 1; } CMD:irpresente(playerid, params[]) {     new LePresente;     new Float:OP1[3], Float:OP2[3], Float:OP3[3], Float:OP4[3], Float:OP5[3];     GetObjectPos(Presentes[0], OP1[0], OP1[1], OP1[2]);     GetObjectPos(Presentes[1], OP2[0], OP2[1], OP2[2]);     GetObjectPos(Presentes[2], OP3[0], OP3[1], OP3[2]);     GetObjectPos(Presentes[3], OP4[0], OP4[1], OP4[2]);     GetObjectPos(Presentes[4], OP5[0], OP5[1], OP5[2]);     if(!IsPlayerAdmin(playerid)) return Msg(playerid, -1, "[FaiL] Você não é um Admin!");     if(sscanf(params, "d", LePresente)) return Msg(playerid, -1, "Use: /irpresente [1-5]");     if(LePresente < 1 || LePresente > 5) return Msg(playerid, -1, "Use: /irpresente [1-5]");     if(PresentesON == false) return Msg(playerid, -1, "[FaiL] Desculpe, mas não foram dados presentes ainda");     if(LePresente == 1)     {         if(Presente1 == true) return Msg(playerid, -1, "[FaiL] Este presente já foi pego");         SetPlayerPos(playerid, OP1[0], OP1[1], OP1[2]);     }     else if(LePresente == 2)     {         if(Presente2 == true) return Msg(playerid, -1, "[FaiL] Este presente já foi pego");         SetPlayerPos(playerid, OP2[0], OP2[1], OP2[2]);     }     else if(LePresente == 3)     {         if(Presente3 == true) return Msg(playerid, -1, "[FaiL] Este presente já foi pego");         SetPlayerPos(playerid, OP3[0], OP3[1], OP3[2]);     }     else if(LePresente == 4)     {         if(Presente4 == true) return Msg(playerid, -1, "[FaiL] Este presente já foi pego");         SetPlayerPos(playerid, OP4[0], OP4[1], OP4[2]);     }     else if(LePresente == 5)     {         if(Presente5 == true) return Msg(playerid, -1, "[FaiL] Este presente já foi pego");         SetPlayerPos(playerid, OP5[0], OP5[1], OP5[2]);     }     return 1; }

OU

PasteBin

•ScreenShots:

Code:
http://i49.tinypic.com/2qd0f20.png

http://i46.tinypic.com/29cqix.png

http://i50.tinypic.com/29zc07.png

http://i46.tinypic.com/wjb9tu.png

http://i46.tinypic.com/10o1qow.png

http://i48.tinypic.com/2d81cvr.png

http://i47.tinypic.com/2ih6o39.png

http://i49.tinypic.com/2cg0cph.png

http://i47.tinypic.com/sgs7y1.png

http://i46.tinypic.com/esjkif.png
Créditos: 
AnonymouSs - Pela criação
Wiki SA:MP - Gata, se você não existisse esse tópico não existiria, Çua Linda.
BlueX, Mandrack_Freeze - Dicas/Ajuda

Observações:
0º - Olhem, o presente é o objeto 19341 até o 19345(Uns OVOS), pois não achei coisa melhor (Se você me indicar um objeto melhor eu agradeço muito  e, obviamente ganha parte dos créditos.
1º - Aceito CRITICAS desde que elas não me ofendam / esculachem pois sou INICIANTE.
2º - Se já existir peço desculpas por procurei e não achei (Prova)
3º - Não adianta falar "Códigos Úteis", pois já postei aqui e não seria necessário eu postar em Códigos Úteis.
4º - Você pode publicar ele em seu Blog/Site, só não retire os créditos Por Favor.
5º - Espero fazer mais coisas com este FS  e, com certeza, aceito ideias.

4 comentários:

João Pedro disse...

Tem Como Tirar Ese FS Da Rcon ? Tipo No Meu Servidor Eu Tirei o Sistema De Rcon AJuda ae ! ! ! !

João Pedro disse...

Alguem ae ? Que consiga Colocar pra usar os Comandos Do Fs Sem Rcon ? Skype:Dj.desmoronaldo - OBS: Ajudara Bastante :) E De Preferencia Admins Que Consigam Usar Com Level 50000 Pra Cima Ajudara Bastante ! ! ! !

João Pedro disse...

Ops Corrigindo* Com Level 5000 Pra Cima Escrevi Errado!

Unknown disse...

So basta remover: if(IsPlayerAdmin(playerid)) do cmd.

Postar um comentário

Cool Red Outer Glow Pointer
▲ Ir para Topo