Neon Library -
Shelby - 18.06.2011
Нndice:
• nLibrary
• Natives
• Cores
• Instalaзгo
• Modo de uso
• ...IsVehicleUsingNeon
• ...Sirenes
• Bikes
• Pics
• Download
nLibrary:
nLibrary й uma livraria que lhe dб a possibilidade de anexar neons a veнculos com muita praticidade e simplicidade.
Natives:
pawn Код:
native AttachNeonToVehicle(vehicleid, neonid);
native RemoveNeonFromVehicle(vehicleid);
native IsVehicleUsingNeon(vehicleid);
native GetVehicleNeonColor(vehicleid);
native IsVehicleUsingBuzzer(vehicleid);
native RemoveBuzzerFromVehicle(vehicleid);
Cores:
pawn Код:
#define NEON_BLUE (0)
#define NEON_PINK (1)
#define NEON_YELLOW (2)
#define NEON_GREEN (3)
#define NEON_RED (4)
#define NEON_WHITE (5)
#define NEON_POLICE (6)
Instalaзгo:
Apenas inclua a include ao seu
script.
Utilizaзгo da native IsVehicleUsingNeon:
Nгo й possнvel utilizar true & false nesta funзгo, apenas 1(true) e 0(false).
pawn Код:
if(IsVehicleUsingNeon(vehicleid) == 1) ...
Ou se preferir.
pawn Код:
/*if(IsVehicleUsingNeon(vehicleid)) й a mesma coisa de if(IsVehicleUsingNeon(vehicleid) == 1)
e if(!IsVehicleUsingNeon(vehicleid)) й a mesma coisa de if(IsVehicleUsingNeon(vehicleid) == 0)*/
Utilizando as luzes policiais:
As sirenes sгo separadas dos neons, entгo й necessбrio usar funзхes diferentes.
IsVehicleUsingBuzzer & RemoveBuzzerFromVehicle
Bikes:
Detalhe: Quando se adiciona neon a uma
bike ele nгo ficarб dois neons um de cada lado, terб apenas um neon central, nгo ficando algo "estranho".
Imagens:
![](http://i51.tinypic.com/5pecdt.png)
![](http://i52.tinypic.com/2hg5zxg.png)
![](http://i52.tinypic.com/2zs0i1k.png)
![](http://i55.tinypic.com/9strpw.png)
![](http://i52.tinypic.com/mwqfld.png)
![](http://i56.tinypic.com/sbso4j.png)
Download:
http://pastebin.com/eZNW6XHL
Re: Neon Library -
ViniBorn - 18.06.2011
Bem interessante
Re: Neon Library -
Shadoww5 - 18.06.2011
Parabйns ! Bela include.
Re: Neon Library -
Chefгo - 18.06.2011
larceny no comeзo vc atй me assusto...
pawn Код:
new NEON_ONE[MAX_VEHICLES] = {INVALID_OBJECT_ID, ...};
new NEON_TWO[MAX_VEHICLES] = {INVALID_OBJECT_ID, ...};
new NEON_COR[MAX_VEHICLES][10];
new bool:IsVehicleUsingNeon[MAX_VEHICLES char];
mais ai eu percebi que faltava um detalhe...
Re: Neon Library -
Shelby - 18.06.2011
Nгo entendi, Chefгo.
Re: Neon Library -
The Knight - 18.06.2011
Bom trabalho (:
Re: Neon Library -
Chefгo - 18.06.2011
Quote:
Originally Posted by Larceny
Nгo entendi, Chefгo.
|
vc uso varias define da include a_samp.
mais vc nгo chamo a include no codigo.
ai eu ja pensei que era possivel usar as defines como se fosse um padrгo do pawno.exe...
depois eu tentei compila e deu erro...
no caso vc deve ter criado ela em um gm com a include a_samp definida primeiro...
nгo sei se vc testo...
eu sei q eu nгo testei ^^
fora isso q me assusto estб perfeito!
Re: Neon Library -
Shelby - 18.06.2011
Ah sim, verdade, eu esqueci de incluir a include
a_samp e testei em um
script com a include jб incluнda.
Valeu pelo toque, jб adicionei a include ao cуdigo.
Re: Neon Library -
ApolloRJ - 18.06.2011
boa ... jб tentei usar vбrios tipos... de neon... infelizmente todos buga..... de alguma forma... achei bem interessante sua inc.. + como eu crio um menu para usar ela...
![Huh?](images/smilies/confused.gif)
n entendi muito bem como funciona.. vc poderia fazer um comando para que eu possa ter uma ideia melhor de como funciona..
![Huh?](images/smilies/confused.gif)
e como ela se comporta no server.. depois que o cara sai... some a neon... gostaria de + detalhes.. desde jб agradeзo...
By ApolloRJ
Re: Neon Library -
The Knight - 18.06.2011
Topo:
PHP код:
#include <nLibrary>
Comando para retirar neon:
PHP код:
if( !strcmp( cmdtext, "/Retirar", true ) )
{
new vehicleid = GetPlayerVehicleID( playerid );
if( !IsVehicleUsingNeon( vehicleid) ) return SendClientMessage( playerid, -1, "<!> Vocк nгo usa nenhum neon!" );
RemoveNeonFromVehicle( vehicleid );
return true;
}
Mais tarde posto mais exemplos.