heal upgrade help
#1

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 ?
Reply
#2

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;

Reply
#3

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.
Reply
#4

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
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)