[Problem]SendCommand [NPC] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Problem]SendCommand [NPC] (
/showthread.php?tid=175122)
[Problem]SendCommand [NPC] -
ofir060 - 08.09.2010
Hey all.
I typed this:
SendCommand(playerid, "/ooc ada");
on the public onplayerspawn, In the if of the NPC.
And when i tested it, it just doesnt work ...
Re: [Problem]SendCommand [NPC] -
Mike_Peterson - 08.09.2010
hmm NPC...... why is it then SendCommand(playerid, instead of SendCommand(npc, (if ur npc named bob then u should type bob there)
Re: [Problem]SendCommand [NPC] -
ofir060 - 08.09.2010
Doesnt work
Re: [Problem]SendCommand [NPC] -
Mauzen - 08.09.2010
You have to use SendCommand and the other NPC commands in the NPC script, not in the gamemode script. Maybe this is the problem.
Re: [Problem]SendCommand [NPC] -
ofir060 - 08.09.2010
How excaly ?
Re: [Problem]SendCommand [NPC] -
ofir060 - 09.09.2010
UP ...
Re: [Problem]SendCommand [NPC] -
Mauzen - 09.09.2010
As I said then, you have to use it from your NPC script if possible.
Instead of SendCommand you could just call the command directly if nothing else works. If you use zcmd or something like this, you can just call the command function. Else copy your command code to a function that you call in OnPlayerCommandText and instead of your SendCommand.
Re: [Problem]SendCommand [NPC] -
ofir060 - 09.09.2010
ok thanks!