SA-MP Forums Archive
Whats wrong? - 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: Whats wrong? (/showthread.php?tid=110652)



Whats wrong? - shoru93 - 27.11.2009

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "/commands");
return 1;
}
{

if (strcmp("/commands", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "here are the commands");
return 1;
}
{
if(strcmp(cmdtext,"/cd",true)==0)
{
cd_sec = 5;
cd_timer = SetTimer("countdown", 999, 1);

return 0;
}
return 1;
}



Re: Whats wrong? - Adamus - 27.11.2009

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid, COLOR_ORANGE, "/commands");
		return 1;
	}
	if (strcmp("/commands", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid, COLOR_ORANGE, "here are the commands");
		return 1;
	}
	if(strcmp(cmdtext,"/cd",true)==0)
	{
		cd_sec = 5;
		cd_timer = SetTimer("countdown", 999, 1);
		return 1;
	}
	return 1;
}



Re: Whats wrong? - shoru93 - 27.11.2009

Thanks