fix buyhouse cmd - 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)
+--- Thread: fix buyhouse cmd (
/showthread.php?tid=645073)
fix buyhouse cmd -
rakinz - 19.11.2017
Код:
CMD:buyhouse(playerid, params[]);
{
if(GetPlayerMoney(playerid) >= 1499999) return SendClientMessage(playerid, COLOR_RED, "ERROR: You don't have enough money");
GivePlayerMoney(playerid, -1500000);
GameTextForPlayer(playerid, "~r~-$1,500,000", 2500, 1);
Delete3DTextLabel(House1Label);
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), ""COL_GREEN"%s's house\n"COL_WHITE"1,500,000$", name);
House1Label = Create3DTextLabel(string, 0x008080FF,2496.049804,-1695.238159,1014.742187, 50.0, 0, 1);
return 1;
}
Can somebody fix it? and tell me what I'm doing wrong here.
It does not compile and send warnings 219.
thx ;e
Re: fix buyhouse cmd -
n00blek - 19.11.2017
idk which line and error you mean dude but you can Update3DTextLabel instead of destroying and creating new one.
also wtf is that first line if player has MORE OR EQUAL money than 150k return error. df should it be < instead of >= ?
Re: fix buyhouse cmd -
rakinz - 19.11.2017
The error lines:
https://imgur.com/a/RPqm2
It does should be < instead of >, Thank you.
Re: fix buyhouse cmd -
Lucases - 19.11.2017
It's some parenthesis missing
Re: fix buyhouse cmd -
Meller - 19.11.2017
CMD:buyhouse(playerid, params[])
;
shall be
CMD:buyhouse(playerid, params[])
Re: fix buyhouse cmd -
rakinz - 19.11.2017
Quote:
Originally Posted by Meller
CMD:buyhouse(playerid, params[]);
shall be
CMD:buyhouse(playerid, params[])
|
Oh god, thanks a lot bro!
I wasn't noticing it and never had that error before..