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; }
CMD:heal(playerid, params[]) // heal command
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_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(playerid, 20.0, House Position X, House position Y, House Position Z)) // your house position variables, replace House Position # with your house vars
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
}
return 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; } how to add ? |
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. |