Skip to content

Instantly share code, notes, and snippets.

@DouglasSherk
Created April 16, 2017 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DouglasSherk/fe0830b3b29e20976e0c3b50c40b39a7 to your computer and use it in GitHub Desktop.
Save DouglasSherk/fe0830b3b29e20976e0c3b50c40b39a7 to your computer and use it in GitHub Desktop.
ARP NPCs base package plugin.
// A callback called for all ARP plugins when the ARP core is loaded.
public ARP_Init() {
new line[256]
new name[32], Float:origin[3], Float:angle, model[128]
while (read_file(NPCS_FILE, line, 255)) {
parse_line_to_npc(line, name, 32, origin, angle, model, 128)
ARP_RegisterNpc(name, origin, angle, model, "handleNpcUsed")
}
}
// The callback which is called when a registered NPC is used
public handleNpcUsed(id, ent) {
ARP_PrintChat(id, "[Edeka] Hello there! See our wares.")
show_menu(id, ent)
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment