Returning unknown command. -
Fat - 18.09.2011
pawn Код:
dcmd_createhouse(playerid, params[])
{
new Float:X,Float:Y,Float:Z, price;
if (PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,COLOR_WHITE,"You're not authroized to use this command !");
if(sscanf(params, "d", price)) return SendClientMessage(playerid, COLOR_WHITE, "[{EE5555}USAGE{FFFFFF}]: /createhouse [price]");
GetPlayerPos(playerid, X,Y,Z);
CreateHouse(price, X, Y, Z);
return 1;
}
Probably a newbie mistake.
If I just type /createhouse, it returns the [USAGE] message, but if I type /createhouse 10000 for example, it returns unknown command.
CreateHouse function :
pawn Код:
stock CreateHouse(Cost, Float:EnterX, Float:EnterY, Float:EnterZ)
{
new house;
house = GeneralSettings[LoadedHouses];
HouseInfo[house][hValue] = Cost;
HouseInfo[house][hEntrancex] = EnterX;
HouseInfo[house][hEntrancey] = EnterY;
HouseInfo[house][hEntrancez] = EnterZ;
GeneralSettings[LoadedHouses]++;
return 1;
}
Re: Returning unknown command. -
Davz*|*Criss - 18.09.2011
How is this code done? I don't think its right to do it likes this, Please use 'Search' Download GarHouse or anyother housing system that might escape you from being time wasting on The New House system.
Re: Returning unknown command. -
Fat - 18.09.2011
Edited
Re: Returning unknown command. -
Kingunit - 18.09.2011
Probably the Createhouse is wrong. Show us that function.
// I see you updated it.
Re: Returning unknown command. -
Fat - 18.09.2011
Anyone ? I'm in need of this.
Re: Returning unknown command. -
[MWR]Blood - 18.09.2011
Debug your code.
Re: Returning unknown command. -
Fat - 18.09.2011
Debug ? how excatly.
Re: Returning unknown command. -
Fat - 19.09.2011
Bump
Re: Returning unknown command. -
Davz*|*Criss - 19.09.2011
I am suggesting you again, To use someone's else.
https://sampforum.blast.hk/showthread.php?tid=182435
https://sampforum.blast.hk/showthread.php?tid=283501
http://forum.sa-mp.com/showthread.ph...ghlight=housin
Re: Returning unknown command. -
GrimR - 19.09.2011
Hmmm I can't really say as I do it manually with normal conditional branching but it looks ok.
I would assume the setup is incorrect (have you gone through how usage of how this dcmd works?).
Also not really relevant but what is with this habit of people not using { } on single line conditionals, probably not a good habit *shrugs*.