[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
#2

very very nicee =D
Reply
#3

awesome їthe user can kill the bot?
Reply
#4

Wow, super!!
Reply
#5

fantastic system
Reply
#6

Thank you for the comments guys!

Quote:
Originally Posted by deryan
View Post
awesome їthe user can kill the bot?
At moment no, the NPC can not be killed... But maybe on next version i will add a function to enable or disable the possibility of kill NPC.
Reply
#7

Cool, I might use it for my Cops and robber server I'm developing, Nice work.
Reply
#8

Why bother using FCNPC for this? Most people can't use that plugin and you also don't need it.
Reply
#9

Quote:
Originally Posted by [uL]Pottus
View Post
Why bother using FCNPC for this? Most people can't use that plugin and you also don't need it.
And whats exactly your problem with it ? You just try to unrecommend it for every person whos using or going to use it, making it look completly useless/worthless. Just stop posting about it

@kreison: Great work
Reply
#10

Quote:
Originally Posted by kreison
View Post
Thank you for the comments guys!


At moment no, the NPC can not be killed... But maybe on next version i will add a function to enable or disable the possibility of kill NPC.
Don't add such a thing, it will be abused for getting score plus i thought adding a function like this is impossible
Reply
#11

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)

check comments of this line npc appears ware u set his coordination , i will explane u : skin ( skin id ) float:X ,y z coordination's of your npc float:ang angle of your npc world id ( insert world id ware he will stand i am usualy use 1- for all words ) interiorid ( interior id ware he will stand ) alarmtypes u can find on first post of this thread , pay=1 (Pay is the parameter to define if the player will receive money on sucess rob) and min and max options is for min and max money u can rob
Reply
#12

i copy this line from your post

Code:
	AddRobNPC(57, 1788.6445, -1601.3077, 13.5469, 169.2070, -1, 0, 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)
Reply
#13

Quote:
Originally Posted by cyberlord
View Post
i copy this line from your post

Code:
	AddRobNPC(57, 1788.6445, -1601.3077, 13.5469, 169.2070, -1, 0, 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)
Use this:
Code:
AddRobNPC(57, 1788.6445, -1601.3077, 13.5469, 169.2070, -1, 0, 0, 1, 1000, 2000);
And i dunno if work with -1 world, if the npc dont appear try world id 0.
Reply
#14

Quote:
Originally Posted by kreison
View Post
Use this:
Code:
AddRobNPC(57, 1788.6445, -1601.3077, 13.5469, 169.2070, -1, 0, 0, 1, 1000, 2000);
And i dunno if work with -1 world, if the npc dont appear try world id 0.
oh yee is works now time to work on robery system , and another question can npc put hands up while siting ?
and what about success robbery rate ?
Reply
#15

i got this when i compile
Quote:

E:\uMKRP\pawno\include\FCNPC.inc(12 : error 025: function heading differs from prototype
E:\uMKRP\pawno\include\FCNPC.inc(133) : warning 202: number of arguments does not match definition
E:\uMKRP\pawno\include\FCNPC.inc(149) : error 025: function heading differs from prototype

And here is my include
Quote:

#include <a_samp>
#include <a_mysql>
#include <streamer>
#include <yom_buttons>
#include <ZCMD>
#include <FCNPC>
#include <robnpcs-v21-fcnpc>
#include <sscanf2>
#include <foreach>
#include <YSI\y_timers>
#include <YSI\y_utils>
#if defined SOCKET_ENABLED
#include <socket>
#endif
#include "./includes/defines.pwn"
#include "./includes/enums.pwn"
#include "./includes/variables.pwn"
#include "./includes/timers.pwn"
#include "./includes/functions.pwn"
#include "./includes/commands.pwn"
#include "./includes/mysql.pwn"
#include "./includes/OnPlayerLoad.pwn"
#include "./includes/callbacks.pwn"
#include "./includes/textdraws.pwn"
#include "./includes/streamer.pwn"
#include "./includes/OnDialogResponse.pwn"

i had include robnpcs-v21-fcnpc + FCNPC
Reply
#16

Quote:
Originally Posted by hichay
View Post
i got this when i compile

And here is my include

i had include robnpcs-v21-fcnpc + FCNPC
do u try to compile include ? or u got them when compiling gamemode ?
Reply
#17

Quote:
Originally Posted by cyberlord
View Post
do u try to compile include ? or u got them when compiling gamemode ?
i got them when i compiling gamemode
Reply
#18

you can add my on skype i will help u to make them work skype : egizz_1
Reply
#19

Interesting, useful and cool.I cant say something else than good job buddy.
Reply
#20

Hello...Sorry for bumping such an old topic...but it can be useful for me since ill be working on a cops and robbers server soon...i just wanted to know will this include add an extra npc in my server? i mean reducing a server slot? and i need to connect each of them manually..? it ll b impossible for me then since i cant have so many slots because id like to add it in every shop.
Help ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)