Created
April 16, 2017 18:20
-
-
Save DouglasSherk/fe0830b3b29e20976e0c3b50c40b39a7 to your computer and use it in GitHub Desktop.
ARP NPCs base package plugin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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