Фильтрскрипт★ 3обновлён апр. 2025 г.MITPawn
Открыть на GitHubREADME.md
SA-MP-Gazelle-Hunting-Job
Gazelle Hunting Job for SA-MP
This is a Gazelle Hunting Job plugin for your SA-MP game mode. It allows players with the Hunter job to hunt gazelles, butcher them, collect meat, and sell it for profit.
📋 Features
- Spawns 24 gazelle objects at predefined locations on map.
- Allows players to start the Hunter job and receive a vehicle & weapon.
- Enables hunting behavior: shoot gazelles, butcher with
Y, then/grabmeat. - Limits carry to 5 gazelles per trip; sell at the trapper NPC for randomized pay.
- Auto-respawns gazelles after a set timer or upon quitting the job.
- Handles player disconnects: auto-pays for collected meat.
- Configurable job commands:
/findjob HUNTER,/grab,/quitjob. - Fully commented functions for easy editing, replacement, or extension.
🚀 Installation
- Copy the plugin code into your server gamemode script (
.pwnfile). - Define the following at the top of your script:
#define GAZELLE_MODEL_ID 19315 // Arrays and enums for gazelle job... - In your
OnGameModeInit, add the initialization block under the comment// look for stock:onGameModeInit() { // Gazelle job init... } - Hook into
OnPlayerConnect,OnPlayerDisconnect,OnPlayerPickUpDynamicPickup,OnPlayerWeaponShot,OnPlayerUpdate,OnPlayerKeyStateChange, and add the provided forward declarations. - Add the new job type in your
enum JobTypelist:enum { JOB_NONE = -1, /* ... */ JOB_HUNTER }; - Extend your
/jobhelpand GPS locator to include the Hunter job.
⚙️ Configuration
- Gazelle Positions: Edit
gazellesloc[][]array to change spawn points. - Timers: Adjust respawn timers in
SetTimerEx("spawn_gazelle", 180000, ...)andspawn_gazellescalls. - Pay Scale: Modify
Random(10000,12000) + 2005to adjust hunter earnings. - Vehicle & Weapon: Change model IDs in
CreateActorandGiveWeaponcalls.
🎮 Usage
- Player types
/findjob HUNTERto mark the Hunter checkpoint. - Go to the dynamic pickup to start hunting; receive vehicle & rifle.
- Drive to gazelle locations, shoot gazelles to knock them down.
- Press
Ynear downed gazelle to start butchering animation. - After butchering, type
/grabto collect meat (up to 5 gazelles). - Return to trapper NPC to sell meat and get paid.
- Type
/quitjobto leave job; automatically paid for any remaining meat.
✏️ Customization
All functions in the code are commented with instructions:
- GetClosestGazelle / GetClosestMeat: Customize detection logic.
- spawn_gazelle / spawn_gazelles: Change respawn behavior.
- OnPlayerWeaponShot: Adjust how gazelles react to weapon hits.
- OnPlayerKeyStateChange: Change interaction keys or animations.
- CMD:grab / CMD:quitjob: Modify commands, parameters, or messaging.
Simply locate the comment blocks above each function and follow the // replace, // edit, or // add notes to integrate into your existing gamemode.
📄 License
This plugin is open-source and free to use. Attribution is appreciated but not required.
For detailed code comments and further editing instructions, refer directly to the source code under each function declaration.
Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью