[UnSolved] Add functions to a_npc.inc
#1

Hey,
I've added this to a_npc.inc:
pawn Код:
native CallRemoteFunction(const function[], const format[], {Float,_}:...);
Will it work properly on NPC scripts?

I think it won't work because after I'm using CallRemoteFunction in NPC script, that script stops working...
Reply
#2

a_npc.inc
Reply
#3

Firstly: Why don't you just try it yourself?
Secondly: Why double post?
Reply
#4

Quote:
Originally Posted by lrZ^ aka LarzI
Firstly: Why don't you just try it yourself?
Secondly: Why double post?
1. It doesn't work for me, so I'm asking if it should work, and I'm doing anything wrong.
2. I apologize to you for double posting, I hope I didn't ruin your day with that.
Reply
#5

Quote:
Originally Posted by SiJ
Quote:
Originally Posted by lrZ^ aka LarzI
Firstly: Why don't you just try it yourself?
Secondly: Why double post?
1. It doesn't work for me, so I'm asking if it should work, and I'm doing anything wrong.
2. I apologize to you for double posting, I hope I didn't ruin your day with that.
Didn't ruin my day, but double posting isn't actually allowed you know.
And you didn't say it didn't work for you, you just asked if it would work with NPC scripts.
Since it's not working for you, it's probally not working at all.
Show us the way you used it?
Showing the definition doesn't help much..
Reply
#6

Quote:
Originally Posted by lrZ^ aka LarzI
Quote:
Originally Posted by SiJ
Quote:
Originally Posted by lrZ^ aka LarzI
Firstly: Why don't you just try it yourself?
Secondly: Why double post?
1. It doesn't work for me, so I'm asking if it should work, and I'm doing anything wrong.
2. I apologize to you for double posting, I hope I didn't ruin your day with that.
Didn't ruin my day, but double posting isn't actually allowed you know.
And you didn't say it didn't work for you, you just asked if it would work with NPC scripts.
Since it's not working for you, it's probally not working at all.
Show us the way you used it?
Showing the definition doesn't help much..
I've added this to a_npc.inc:

pawn Код:
native CallRemoteFunction(const function[], const format[], {Float,_}:...);
And here is my NPC script:

pawn Код:
#include <a_npc>
#include <dudb>
#pragma unused ret_memcpy  //It gives me "warning 203: symbol is never used: "ret_memcpy"" so I use this..
main(){}

public OnNPCModeInit(){}
public OnNPCModeExit(){}
public OnNPCConnect(myplayerid){}
public OnNPCDisconnect(reason[]){}
public OnNPCSpawn(){}
public OnClientMessage(color, text[]){}
public OnPlayerDeath(playerid){}
public OnPlayerText(playerid, text[])
{
    if(strfind(text,"any jobs for me") != -1)
    {
        print("NPC: Someone asks for drug dealer job!");
            if (CallRemoteFunction("PlayerHasJob","d",playerid))
            {
              print("NPC: He already has a job!");
            }
            else
        {
            CallRemoteFunction("MakeDrugDealer","d",playerid);
            print("NPC: Job given!");
        }
    }
}
public OnPlayerStreamIn(playerid){}
public OnPlayerStreamOut(playerid){}
public OnVehicleStreamIn(vehicleid){}
public OnVehicleStreamOut(vehicleid){}
As you can see I don't use recording for this script, but it should work without recording, right?
Reply
#7

Not completely sure, but I think so.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)