[Include] Robbery NPC System v1.1 (FCNPC)
#1

Robbery NPC System V2.1 (FCNPC/RNPC)


What is it?

It is an include that adds NPCs that recreates in a very similar way the system of shoplifting of GTA San Andreas single player/GTA V online.


Functions
pawn Code:
AddRobNPC(skin, Float:x, Float:y, Float:z, Float:ang, worldid, interiorid, alarmtype = 0**, pay = 1, min = 1000, max = 2000) // Add a NPC (Pay is the parameter to define if the player will receive money on sucess rob)
StopAlarm(playerid) // Force stop the alarm for a given player

Callbacks
pawn Code:
OnPlayerSucessRob(playerid, npcid, value) // Starts when a player successfully rob an NPC (Value is the money received on sucess rob)
OnPlayerFailRob(playerid, npcid) // Starts when a player fails to rob an NPC

Alarm types**
0 - Stop the alarm when the player is in a different interior from the NPC/sound without set point;
1 - Stop the alarm when the player is in a different interior from the NPC/sound with set point;
2 - Stop the alarm after the set time interval (on the configuration of the include)/sound without set point;
3 - Stop the alarm after the set time interval (on the configuration of the include)/sound with set point;
4 - The alarm won't stop/sound without set point;
5 - The alarm won't stop/sound with set point.
NOTE1: Types 0 and 1 are not recommended for NPCS on interior id 0.
NOTE2: Types 4 and 5 can be used with the function StopAlarm(playerid) to make a custom alarm system.



Configuration
The include is easily configurable, just open the include and at the top of the code you will see the configuration defines with comments.


Suggestions and bugs
Feel free to leave suggestions for the next version and bug report. I'll try to keep this include updated as new ideas or bugs to be fixed appear.


Next version
My plan for the next version is to adapt to include other NPC plugins and maybe a version without plugins.


WARNING
For this include work is necessary that the server has included and loaded the plugin FCNPC or RNPC!


Video demonstration (In portuguese)
[ame]http://www.youtube.com/watch?v=5jL8c2GRhus[/ame]


Credits
Mauzen for the RNPC (https://sampforum.blast.hk/showthread.php?tid=355849) and OrMisicL/[LCK]Chris for the FCNPC (https://sampforum.blast.hk/showthread.php?tid=428066).


Download
v2.1 (RNPC)

Sendspace
https://www.sendspace.com/file/uihycs

Pastebin
http://pastebin.com/tx1BMAb7


v2.1 (FCNPC)
Sendspace
https://www.sendspace.com/file/65nsf5

Pastebin
http://pastebin.com/R56ZGdBk



I hope you guys enjoy it and sorry for my bad english
Portuguese topic: https://sampforum.blast.hk/showthread.php?tid=477208
Reply


Messages In This Thread
Robbery NPC System V2.1 (FCNPC/RNPC) - by kreison - 26.11.2013, 12:12
Re: Robbery NPC System v1.1 (FCNPC) - by filipkozina - 26.11.2013, 15:51
Respuesta: Robbery NPC System v1.1 (FCNPC) - by deryan - 26.11.2013, 19:16
Re: Robbery NPC System v1.1 (FCNPC) - by KesaSport - 26.11.2013, 19:28
Re: Robbery NPC System v1.1 (FCNPC) - by PT - 26.11.2013, 19:44
Re: Respuesta: Robbery NPC System v1.1 (FCNPC) - by kreison - 26.11.2013, 23:28
Re: Robbery NPC System v1.1 (FCNPC) - by jueix - 04.12.2013, 13:56
Re: Robbery NPC System v1.1 (FCNPC) - by Pottus - 04.12.2013, 17:46
Re: Robbery NPC System v1.1 (FCNPC) - by OrMisicL - 04.12.2013, 19:13
Re: Respuesta: Robbery NPC System v1.1 (FCNPC) - by Arastair - 19.07.2014, 19:27
Re: Robbery NPC System v1.1 (FCNPC) - by cyberlord - 16.12.2014, 11:04
Re: Robbery NPC System v1.1 (FCNPC) - by cyberlord - 16.12.2014, 19:49
Re: Robbery NPC System v1.1 (FCNPC) - by kreison - 16.12.2014, 19:54
Re: Robbery NPC System v1.1 (FCNPC) - by cyberlord - 16.12.2014, 19:59
Re: Robbery NPC System v1.1 (FCNPC) - by hichay - 17.12.2014, 04:44
Re: Robbery NPC System v1.1 (FCNPC) - by cyberlord - 17.12.2014, 09:06
Re: Robbery NPC System v1.1 (FCNPC) - by hichay - 17.12.2014, 10:18
Re: Robbery NPC System v1.1 (FCNPC) - by cyberlord - 17.12.2014, 10:38
Re: Robbery NPC System v1.1 (FCNPC) - by bustern - 17.12.2014, 21:13
Re: Robbery NPC System v1.1 (FCNPC) - by Ritzy2K - 23.02.2015, 18:55

Forum Jump:


Users browsing this thread: 1 Guest(s)