Multiple command inside one dcmd cmd?
#1

Код:
dcmd_house(playerid, params[])
{
	new
		command[128], owner[255];
	if(Account[playerid][pAdminLevel] >= 20)
	{
	  if (sscanf(params, "s", command)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /house <add>");
	  else
	  {
	    if(strcmp(command,"add", true ) == 0)
	    {
				if (sscanf(command, "s", owner)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /house add <owner>");
				else
				{
					new Float:x,Float:y,Float:z,Float:angle;
					GetPlayerPos(playerid,x,y,z);
					GetPlayerFacingAngle(playerid,angle);
					AddHouse(owner,x,y,z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid),angle,0/*exitx*/,0/*exity*/,0/*exitz*/,1337/*exitinterior*/,0/*exitangle*/,0/*owned*/,0/*rentable*/,0/*rentcost*/,0/*houseprice*/,0/*locked*/);
				}
			}
			else
			{
			  return SendClientMessage(playerid, 0xFF0000AA, "Invalid house command.");
			}
	  }
	}
	return 1;
}
This is my command, i want to have multiple commands inside of one but i haven't coded in months and i'm a little rusty.

I can see where the problem is but i'm not sure how to solve it, i posted this ages ago and someone gave me a wonderful result which did the trick but i formatted and lost my script.
Reply


Messages In This Thread
Multiple command inside one dcmd cmd? - by Norn - 31.08.2009, 02:06
Re: Multiple command inside one dcmd cmd? - by JaTochNietDan - 31.08.2009, 02:08
Re: Multiple command inside one dcmd cmd? - by Norn - 31.08.2009, 02:13
Re: Multiple command inside one dcmd cmd? - by JaTochNietDan - 31.08.2009, 02:15
Re: Multiple command inside one dcmd cmd? - by Norn - 31.08.2009, 02:16
Re: Multiple command inside one dcmd cmd? - by JaTochNietDan - 31.08.2009, 02:19
Re: Multiple command inside one dcmd cmd? - by Norn - 31.08.2009, 02:22
Re: Multiple command inside one dcmd cmd? - by JaTochNietDan - 31.08.2009, 02:37
Re: Multiple command inside one dcmd cmd? - by Norn - 31.08.2009, 02:39
Re: Multiple command inside one dcmd cmd? - by Clavius - 31.08.2009, 16:18

Forum Jump:


Users browsing this thread: 1 Guest(s)