Command doesn`t work 0.3b R2-3!!!!! - 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: Command doesn`t work 0.3b R2-3!!!!! (
/showthread.php?tid=197802)
[HELP]/Command doesn`t work 0.3b R2-3!!!!! -
vakhtang - 10.12.2010
When I enter server command doesn't work
Here is Code:
pawn Код:
//------------------------------------------------------------------------------
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
//------------------------------------------------------------------------------
public OnFilterScriptInit()
{
return 1;
}
//------------------------------------------------------------------------------
public OnFilterScriptExit()
{
return 1;
}
//------------------------------------------------------------------------------
#else
//------------------------------------------------------------------------------
#endif
//------------------------------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/heal", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0xFFFF00AA, "(INFO) You have been healed!");
return 1;
}
if (strcmp("/kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFFFF00AA, "(INFO) You have commited suicide!");
return 1;
}
if (strcmp("/help", cmdtext, true, 5) == 0)
{
SendClientMessage(playerid, 0xFFFF00AA, "(INFO) Welcome to my Server's HELP command!");
return 1;
}
return 0;
}
//------------------------------------------------------------------------------
I don't know why it doesn't work
Everything is just fine and right
Re: Command doesn`t work 0.3b R2-3!!!!! -
vakhtang - 10.12.2010
Hey dude, The NPC blocks somehow the command
Re: Command doesn`t work 0.3b R2-3!!!!! -
Scones - 10.12.2010
lol, someone needs to look at the author again maybe get some glasses
Respuesta: Command doesn`t work 0.3b R2-3!!!!! -
kirk - 10.12.2010
pawn Код:
//------------------------------------------------------------------------------
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
//------------------------------------------------------------------------------
public OnFilterScriptInit()
{
return 1;
}
//------------------------------------------------------------------------------
public OnFilterScriptExit()
{
return 1;
}
//------------------------------------------------------------------------------
#else
//------------------------------------------------------------------------------
#endif
//------------------------------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/heal", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have been healed!");
return 1;
}
if (strcmp("/kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have commited suicide!");
return 1;
}
if (strcmp("/help", cmdtext, true, 5) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "(INFO) Welcome to my Server's HELP command!");
return 1;
}
return 0;
}
//------------------------------------------------------------------------------
If you cant fix it replace all with that.
anyways a little explain, you just need to define that color you gonna use as
Код:
#define COLOR_YELLOW 0xFFFF00AA
Then you just need to replace the 0xFFFF00AA with COLOR_YELLOW, compile it and will work.
No zcmd need it lol