03.09.2011, 13:34
Once again, i need help. I got a script, where you can get armour with /heal in a house, if the house has armour upgrade.
Well, i don't want everyone have full armour, only scripted faction leaders. So i need an exception in the /heal (armour only, not health) that only faction leaders can have armour by /heal in a house, and if possible, in faction HQ!
The /heal script where i want the exception, is this:
Well, i don't want everyone have full armour, only scripted faction leaders. So i need an exception in the /heal (armour only, not health) that only faction leaders can have armour by /heal in a house, and if possible, in faction HQ!
The /heal script where i want the exception, is this:
pawn Код:
//-----------------------------------[HEAL]-------------------------------------------------------------------------
if(strcmp(cmd, "/heal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
new location = PlayerInfo[playerid][pLocal];
if(!strlen(tmp))
{
if(location != 255)
{
if(location < 99)
{
if(HouseInfo[location][hArm] == 1)
{
format(string, sizeof(string), "* %s puts on body armour.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerArmour(playerid, 100.0);
}
else
{
format(string, sizeof(string), "This place does not have armour upgrades.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
if(HouseInfo[location][hHel] == 1)
{