Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*******************************************************************************
- * [INC] Instagib include by Matthias *
- ********************************************************************************
- * *
- * This is an example filterscript of my include, you can edit it all you *
- * want, I wrote it in 5 minutes so I don't really care. I hope you enjoy *
- * the include and the filterscript! *
- * *
- * Author: Matthias *
- * Email: [email protected] *
- * *
- *******************************************************************************/
- #include <a_samp>
- #include <Instagib>
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_GREEN 0x33AA33AA
- public OnFilterScriptInit()
- {
- SetInstagibForAll(31, true); // This will make sure everyone can kill anyone with one shot of an M4.
- print("\n=============================================================");
- print(" Example filterscript of Matthias` Instagib include loaded.");
- print("==============================================================\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n===============================================================");
- print(" Example filterscript of Matthias` Instagib include unloaded.");
- print("================================================================\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Inst::OnPlayerConnect(playerid); // This is needed in OnPlayerConnect for the script to function correctly.
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- Inst::OnPlayerSpawn(playerid); // This function is needed in OnPlayerSpawn for the script to function correctly.
- SetInstagibForPlayer(playerid, 34, true); // This player will be able to kill anyone with one shot of a sniper.
- // Give him the weapons.. otherwise he won't be able to kill.
- GivePlayerWeapon(playerid, 31, 999);
- GivePlayerWeapon(playerid, 34, 999);
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- // This function is needed in the OnPlayerKeyStateChange callback for the script to function correctly.
- Inst::OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
- return 1;
- }
- public OnPlayerInstagibKill(playerid, killerid, weaponid)
- {
- // If somebody kills somebody else with an Instagib kill, we reward him and send everyone a message!
- new szString[128], pName[24], kName[24];
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(killerid, kName, sizeof(kName));
- format(szString, sizeof(szString), "* %s has managed to kill %s with one shot of a gun with the weapon ID: %d.", kName, pName, weaponid);
- SendClientMessageToAll(COLOR_YELLOW, szString);
- GivePlayerMoney(killerid, 1337);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment