command problem - 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 problem (
/showthread.php?tid=140160)
command problem -
johnathon956 - 07.04.2010
i have a problem when i enter a command that dont exist this happens
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/cmds", true) == 0)
SendClientMessage(playerid, 0xDEEE20FF, "/carmenu to spawn cars");
SendClientMessage(playerid, 0xDEEE20FF, "this is a place holder for another command :P");
if(strcmp(cmdtext, "/adminhouse", true) == 0)
SetPlayerPos(playerid,2559.5488,-1769.4063,480.7705);
return 1;
}
Re: command problem -
aircombat - 07.04.2010
use this :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/cmds", true) == 0)
{
SendClientMessage(playerid, 0xDEEE20FF, "/carmenu to spawn cars");
SendClientMessage(playerid, 0xDEEE20FF, "this is a place holder for another command :P");
return 1;
}
if(strcmp(cmdtext, "/adminhouse", true) == 0)
{
SetPlayerPos(playerid,2559.5488,-1769.4063,480.7705);
return 1;
}
return 0;
}