Where do I place the cmd to work? - 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: Where do I place the cmd to work? (
/showthread.php?tid=175323)
Where do I place the cmd to work? -
New_Player[USW] - 09.09.2010
Hi guys i need know the correct place to put the cmd (in the pawn file of GM) for it to work but i don't know exactly where to place it exactly.Can anyone help?I'm just a new scripter. The code is:
if(!strcmp("/thecmd", cmdtext, true))
{
SetPlayerPos(playerid, -1992.3206787109, 2260.1875, 18.924165725707);
SetPlayerFacingAngle(playerid, 0);
SendClientMessage(playerid, 0xFED530FF, The line i need to put(i know about it).);
return 1;
}
If anyone can help please do help thank you.
Re: Where do I place the cmd to work? -
[XST]O_x - 09.09.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/thecmd", cmdtext, true))
{
SetPlayerPos(playerid, -1992.3206787109, 2260.1875, 18.9241657257);
SetPlayerFacingAngle(playerid, 0);
SendClientMessage(playerid, 0xFED530FF," The line i need to put(i know about it).");
return 1;
}
//More commands here
return 0;
}
Re: Where do I place the cmd to work? -
New_Player[USW] - 09.09.2010
I don't understand. What i need is the exact line to place this.
Re: Where do I place the cmd to work? -
LarzI - 09.09.2010
Between
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
and
Re: Where do I place the cmd to work? -
[XST]O_x - 09.09.2010
Somewhere in your gamemode,not under any other callbacks.
Re: Where do I place the cmd to work? -
LarzI - 09.09.2010
Quote:
Originally Posted by [XST]O_x
Somewhere in your gamemode,not under any other callbacks.
|
The callback where the commands should be inside, yes.
Don't misdirect.
<This forum requires that you wait 120 seconds between posts. Please try again in 70 seconds.> - stfu
Re: Where do I place the cmd to work? -
[XST]O_x - 09.09.2010
Quote:
Originally Posted by LarzI
The callback where the commands should be inside, yes.
Don't misdirect.
<This forum requires that you wait 120 seconds between posts. Please try again in 70 seconds.> - stfu
|
I believe he meant the OnPlayerCommandText callback I gave him.
Re: Where do I place the cmd to work? -
LarzI - 09.09.2010
Ah, my bad then.