SA-MP Forums Archive
String Comparing problems! - 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: String Comparing problems! (/showthread.php?tid=166961)



String Comparing problems! - armyoftwo - 10.08.2010

Код:
COMMAND:addexportplace(playerid, params[]) {
	new Float:x, Float:y, Float:z;
	new type[24];
	GetPlayerPos(playerid, x, y, z);
	if(strcmp(type, "Car", true) == 0)
	{
	   AddNewExportPlace( x , y , z, 1 );
	   SendClientMessage(playerid, COLOR_SYSTEM, "Car export place has been added!");
	   return 1;
	}
	else {
	if(strcmp(type, "Boat", true) == 0)
	{
	   AddNewExportPlace( x , y , z, 2 );
	   SendClientMessage(playerid, COLOR_SYSTEM, "Boat Export place has been added!");
	   return 1;
	}
	else {
	if(strcmp(type, "Plane", true) == 0)
	{
	   AddNewExportPlace( x , y , z, 3 );
	   SendClientMessage(playerid, COLOR_SYSTEM, "Plane Export place has been added!");
	   return 1;
	}}}
	return 1;
}
It executes

Код:
AddNewExportPlace( x , y , z, 1 );
And it sends "Unknown Command"

I don't even type: /addexportplace Car i type /addexportplace
What's wrong?