How do I talk between my GM script and NPC script? REP+
#1

Hi,

So right now I've got my NPC script which runs the recordings for the NPC and I've got my GM script which the NPC runs from.

Within both scripts I have written something like this below, to see if the player is near the NPC when they type a cmd

Код:
public OnPlayerText(playerid, text[]){
	if(!strcmp(text, "-npc", true)){
	    new Float:x, Float:y, Float:z;
	    GetPlayerPos(0, x, y, z); // playerid 0 is npc for testing purposes
		//GetDistanceFromMeToPoint(x,y,z, distance);
		if(GetPlayerDistanceFromPoint(playerid, x, y, z) < 10){
When a player types -npc it changes the recording the NPC is playing (from NPC script) and it shows the player a textdraw (from GM script).... Now, this is where I am having trouble

I need to change the recording the NPC is playing when the player clicks on a selectable textdraw... So, how would I tell the NPC script to change the recording from OnPlayerSelectTextdraw (or w/e it is) in my GM script?

Thanks
Reply
#2

Hard work, I wish I could've helped you - Vinewood.
Reply
#3

bump
Reply
#4

bump
Reply
#5

Solved with OnClientMessage
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)