12.04.2015, 14:00
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
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
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){
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