SA-MP Forums Archive
heal upgrade help - 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: heal upgrade help (/showthread.php?tid=654231)



heal upgrade help - marshmallow - 24.05.2018

hello this is my /hupgrade command
Код:
CMD:hupgrade(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
    if(IsPlayerConnected(playerid))
	{
		if (PlayerInfo[playerid][pPhousekey] != 999 && strcmp(PlayerInfo[playerid][pNormalName], HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
		{
			ShowPlayerDialog(playerid, DIALOG_HUPGRADE, DIALOG_STYLE_LIST, "House upgrades", "Food upgrade  - $50,000\nMusic upgrade  - {FFFF00}15 premium points", "Select", "Exit");
		}
		else return SendClientMessage(playerid, COLOR_WHITE, "You don't own a house.");
	}
	return 1;
}
i want add a command /heal for heal in my own house (if house upgraded)
how to add ?


Re: heal upgrade help - SeanDenZYR - 24.05.2018

PHP код:
CMD:heal(playeridparams[]) // heal command
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"You need to log in first."); // if player is logged in

    
if(IsPlayerConnected(playerid)) // if player is connected, not really necessary but yeah.
    
{
        if(
IsPlayerInRangeOfPoint(playerid20.0House Position XHouse position YHouse Position Z)) // your house position variables, replace House Position # with your house vars
        
SetPlayerHealth(playerid100.0);
        
SetPlayerArmour(playerid100.0);
    }
    return 
1;




Re: heal upgrade help - Sew_Sumi - 24.05.2018

That's not what he said, nor means... This is a feature in Godfather and Public Enemy that allows for the houses to have a heal command inside them.

It's been hacked out of so many versions of the script, that it's amazing thyat anyone even finds the remnants and wants to implement it again.


OP, This is so general a question, and so little code, that it's simply begging for code.

This is not what this forum is for.



If you want to find this that I speak of, check the OLD Public Enemy Script, or the ACTUAL old GodFather, as this was a feature that was implemented... Each subsequent 'edit' ripped more and more out of the base script.


Re: heal upgrade help - marshmallow - 25.05.2018

Quote:
Originally Posted by marshmallow
Посмотреть сообщение
hello this is my /hupgrade command
Код:
CMD:hupgrade(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
    if(IsPlayerConnected(playerid))
	{
		if (PlayerInfo[playerid][pPhousekey] != 999 && strcmp(PlayerInfo[playerid][pNormalName], HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
		{
			ShowPlayerDialog(playerid, DIALOG_HUPGRADE, DIALOG_STYLE_LIST, "House upgrades", "Food upgrade  - $50,000\nMusic upgrade  - {FFFF00}15 premium points", "Select", "Exit");
		}
		else return SendClientMessage(playerid, COLOR_WHITE, "You don't own a house.");
	}
	return 1;
}
i want add a command /heal for heal in my own house (if house upgraded)
how to add ?
Please help


Re: heal upgrade help - Sew_Sumi - 25.05.2018

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
OP, This is so general a question, and so little code, that it's simply begging for code.

This is not what this forum is for.



If you want to find this that I speak of, check the OLD Public Enemy Script, or the ACTUAL old GodFather, as this was a feature that was implemented... Each subsequent 'edit' ripped more and more out of the base script.
Please read.