07.03.2010, 21:02
Some of you have seen me on the forums so far, i'm pretty much new to scripting, I'm a c++ coder and a PHP coder, so PAWN is easier for me atm.
I noticed people were releasing scripts here, and I thought, why not make something that isn't in SA-MP, like the teargas feature, so I simply, went into Pawno, and did my thing.
There are some functions I must explain, you can use them to activate the teargas.
Installing is very easy, open up your scripting editor, and add
this will enable you to use the functions, add this under a_samp
I've taken some pictures of the teargas effects etc..
Download available here:
http://pastebin.com/XcDCyK2K
2: Put TearGas_OnPlayerConnect(playerid); in OnPlayerConnect.
3: Put TearGasOnPlayerKeyStateChange(playerid, newkeys); in OnPlayerKeyStateChange
4: If you're not going to use a function at the moment or never put, #pragma unused The Function Name. A example of that is: #pragma unused SetPlayerTearGas
Oh and, I couldn't find the cough animation, I tried my best to do what I can do.
This is my first release, I hope I did good
I noticed people were releasing scripts here, and I thought, why not make something that isn't in SA-MP, like the teargas feature, so I simply, went into Pawno, and did my thing.
There are some functions I must explain, you can use them to activate the teargas.
Code:
native TearGas_OnPlayerConnect(playerid); - Use this to reset a players teargas. native GivePlayerTearGas(playerid, amount); - Gives the player a certain amount of teargas. native SetPlayerTearGas(playerid, amount); - Sets the player's teargas amount. native GetPlayerTearGas(playerid); - Gets a players teargas amount.
Code:
#include <TearGas.inc>
I've taken some pictures of the teargas effects etc..
Download available here:
http://pastebin.com/XcDCyK2K
Installation Guide
1: Put #include <TearGas.inc> in your script.2: Put TearGas_OnPlayerConnect(playerid); in OnPlayerConnect.
3: Put TearGasOnPlayerKeyStateChange(playerid, newkeys); in OnPlayerKeyStateChange
4: If you're not going to use a function at the moment or never put, #pragma unused The Function Name. A example of that is: #pragma unused SetPlayerTearGas
Oh and, I couldn't find the cough animation, I tried my best to do what I can do.
This is my first release, I hope I did good