|
|
#1 |
|
Big Clucker
![]() ![]() Join Date: Mar 2008
Posts: 71
Reputation: 2
|
Code:
NNNNNNNN NNNNNNNNPPPPPPPPPPPPPPPPP CCCCCCCCCCCCC N:::::::N N::::::NP::::::::::::::::P CCC::::::::::::C N::::::::N N::::::NP::::::PPPPPP:::::P CC:::::::::::::::C N:::::::::N N::::::NPP:::::P P:::::P C:::::CCCCCCCC::::C N::::::::::N N::::::N P::::P P:::::P C:::::C CCCCCC N:::::::::::N N::::::N P::::P P:::::PC:::::C N:::::::N::::N N::::::N P::::PPPPPP:::::P C:::::C N::::::N N::::N N::::::N P:::::::::::::PP C:::::C N::::::N N::::N:::::::N P::::PPPPPPPPP C:::::C N::::::N N:::::::::::N P::::P C:::::C N::::::N N::::::::::N P::::P C:::::C N::::::N N:::::::::N P::::P C:::::C CCCCCC N::::::N N::::::::NPP::::::PP C:::::CCCCCCCC::::C N::::::N N:::::::NP::::::::P CC:::::::::::::::C N::::::N N::::::NP::::::::P CCC::::::::::::C NNNNNNNN NNNNNNNPPPPPPPPPP CCCCCCCCCCCCC Code:
88888888ba 88888888ba 88 88888888ba, ,ad8888ba, 88888888888 88 "8b 88 "8b 88 88 `"8b d8"' `"8b 88 88 ,8P 88 ,8P 88 88 `8b d8' 88 88aaaaaa8P' 88aaaaaa8P' 88 88 88 88 88aaaaa 88""""""8b, 88""""88' 88 88 88 88 88888 88""""" 88 `8b 88 `8b 88 88 8P Y8, 88 88 88 a8P 88 `8b 88 88 .a8P Y8a. .a88 88 88888888P" 88 `8b 88 88888888Y"' `"Y88888P" 88888888888 This is a communication Bridge between any GameMode and NPC. Installation ON YOUR GAMEMODE: After your includes: Code:
#define SECRETCODE "!:S3cr3tC0d3:!" // Insert your secret code here, this allow communication to the NPC's, make it safe since it can be used in chat or anyone can control any bot!!!!, Consider it as a rcon password! #define TOTALCHARS 14 // Total chars of the Secret word, sorry cant use sizeof :( #include <npc_bridge> // Our include. After your includes: Code:
#define SECRETCODE "!:S3cr3tC0d3:!" // Insert your secret code here, this allow communication to the NPC's, make it safe since it can be used in chat or anyone can control any bot!!!!, Consider it as a rcon password! #define TOTALCHARS 14 // Total chars of the Secret word, sorry cant use sizeof :( #include <npc_bridge> // Our include. Code:
public OnClientMessage(color, text[])
{
ClientMessageBridge(text); // Call the function needed.
}
Usage: Run a command trough your gamemod: Code:
NPCMessage(<NPC ID>, "<SYNTAX>", "<COMMAND HERE>"); Code:
NPCMessage(NPCIdHere, "This is a sample SendChat", "SendChat"); // SendChat("This is a sample SendChat")
NPCMessage(NPCIdHere, "/mycommand", "SendCommand"); // SendCommand("/mycommand")
NPCMessage(NPCIdHere, "2 square", "StartRecordingPlayback"); // StartRecordingPlayback(2,"square");
NPCMessage(NPCIdHere, "StopRecordingPlayback", "StopRecordingPlayback"); // StopRecordingPlayback();
NPCMessage(NPCIdHere, "PauseRecordingPlayback", "PauseRecordingPlayback"); // PauseRecordingPlayback();
NPCMessage(NPCIdHere, "ResumeRecordingPlayback", "ResumeRecordingPlayback"); // ResumeRecordingPlayback();
Code:
[COMMAND] - [SYNTAX] SendChat - Message SendCommand - /Command StartRecordingPlayback - <Recording Type ID>[space]<Recording Name> StopRecordingPlayback - None PauseRecordingPlayback - None ResumeRecordingPlayback - None > Kye & The SA:MP Dev team (Not only for the new great version but also for the nice examples that i was able to modify) > Backwardsman97 for this > Zezombia, because he release "made"/"inspired" me to release this ![]() Download it Here PS: Please report any bugs! Changelog: 0.1: Released 0.1.1: Removed some forgotten debug functions |
|
|
|
|
|
#2 |
|
Big Clucker
![]() ![]() Join Date: Feb 2009
Posts: 50
Reputation: 0
|
Looks nice, but your download link is not working.
|
|
|
|
|
|
#3 | |
|
Big Clucker
![]() ![]() Join Date: Mar 2008
Posts: 71
Reputation: 2
|
Quote:
There was an error during the upload, fixed
|
|
|
|
|
|
|
#4 | ||
|
Big Clucker
![]() ![]() Join Date: Feb 2009
Posts: 50
Reputation: 0
|
Quote:
|
||
|
|
|
|
|
#5 | |||
|
Big Clucker
![]() ![]() Join Date: Mar 2008
Posts: 71
Reputation: 2
|
Quote:
|
|||
|
|
|
|
|
#6 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Feb 2010
Location: ES
Posts: 2,703
Reputation: 148
|
Cool
|
|
|
|
|
|
#7 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Dec 2007
Posts: 260
Reputation: 0
|
But it is Wrong Section i think
|
|
|
|
|
|
#8 |
|
Big Clucker
![]() ![]() Join Date: Mar 2008
Posts: 71
Reputation: 2
|
Oh this is old :P
This is here since the pre-beta for developers, when SA:MP 0.3 was still a dream for us mortals. This was in fact posted over the 0.3 stuff but with the changes this got lost here ![]() Going to report to get moved to FS & Inc's. Thanks guys
|
|
|
|
|
|
#9 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Feb 2008
Location: Det. Mi. USA.....
Posts: 530
Reputation: 7
|
Seems like the easiest system around for NPC communication but I can't get it to work when using YSI, more specifically (I believe) its foreach that is causing the problems. I am running some tests now to see if I can't figure out exactly why.
[Edit] Out I figured out the problem, it has to do with the way foreach determines if something is a bot (SendChat) and since this include uses that it broke foreach. Since I am not using this feature (I only want it for the playback features) I was able to comment those sections out and everything is compiling fine now. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| In-Game Voice Communication | Charles | General | 79 | 19/05/2011 03:17 PM |
| MOVED: [INC] NPC-Bridge (GM to NPC Communication) | JaTochNietDan | Help Archive | 0 | 12/02/2010 09:04 AM |
| Communication between Filterscript and GameMode | Oxside | Help Archive | 10 | 02/01/2010 07:04 PM |
| [INC] Zezombia's Simple Communication Bot Sync System | Zezombia | Help Archive | 11 | 04/09/2009 09:57 AM |
| communication in general chat | odyvan | Help Archive | 7 | 05/04/2009 12:55 AM |