[HELP] Two cmd's with the same name?
#4

Quote:
Originally Posted by Swift_
Something like this...
pawn Код:
if(strcmp(cmdtext, "/enter", true) == 0)
{
 if(PlayerToPoint(3, playerid, x, y, z)) //put the coordinates of the enter position of bulding 1
 {
   //code here
 }
 else if(PlayerToPoint(3, playerid, x, y, z)) //put the coordinates of the enter position of building 2
 {
   //code here
 }
 ///and so on
}
I have it like this, but i get 4 warnings

Код:
	if (strcmp("/enter", cmdtext, true, 10) == 0)
	{
	if(PlayerToPoint(playerid,1172.6697,-1321.4301,15.3988,3)) { 
	SetPlayerPos(playerid,288.745971,169.350997,1007.171875);
  	SetPlayerInterior(playerid,3);
	}
	else if(PlayerToPoint(playerid,2148.9336,-1484.9655,26.6240,3)) { 
 	SetPlayerPos(playerid,2454.717041,-1700.871582,1013.515197);
 	SetPlayerInterior(playerid,2);
	}
	return 1;
 	}
	if (strcmp("/exit", cmdtext, true, 10) == 0)
	{
	if(PlayerToPoint(playerid,288.745971,169.350997,1007.171875,3)) { 
	SetPlayerPos(playerid,1172.6697,-1321.4301,15.3988);
 	SetPlayerInterior(playerid,0);
	}
	else if(PlayerToPoint(playerid,2454.717041,-1700.871582,1013.515197,3)) { 
 	SetPlayerPos(playerid,2148.9336,-1484.9655,26.6240);
 	SetPlayerInterior(playerid,0);
	}
	return 1;
 	}
	return 0;
}
The Warnings:

Код:
tag mismatch
tag mismatch
tag mismatch
tag mismatch
Reply


Messages In This Thread
[HELP] Two cmd's with the same name? - by FreddeN - 20.06.2009, 11:17
Re: [HELP] Two cmd's with the same name? - by MenaceX^ - 20.06.2009, 11:34
Re: [HELP] Two cmd's with the same name? - by Grim_ - 20.06.2009, 11:36
Re: [HELP] Two cmd's with the same name? - by FreddeN - 20.06.2009, 11:47
Re: [HELP] Two cmd's with the same name? - by Grim_ - 20.06.2009, 11:48
Re: [HELP] Two cmd's with the same name? - by FreddeN - 20.06.2009, 11:59
Re: [HELP] Two cmd's with the same name? - by Abernethy - 20.06.2009, 12:01
Re: [HELP] Two cmd's with the same name? - by Grim_ - 20.06.2009, 12:02
Re: [HELP] Two cmd's with the same name? - by FreddeN - 20.06.2009, 12:07
Re: [HELP] Two cmd's with the same name? - by Grim_ - 20.06.2009, 12:09

Forum Jump:


Users browsing this thread: 1 Guest(s)