How to end this script good ?
#1

hello guys,

i have a little script that i would put into te Ravens scip but it wil not compile anything below it so could anyone tell me how to end this script good ?
Код:
        if(strcmp(cmd, "/househeal", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);

			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_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
							SafeSetPlayerArmour(playerid, 50.0);
						}
						else
						{
							format(string, sizeof(string), "This place does not have armour upgrades.");
							SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
						}
						if(HouseInfo[location][hHel] == 1)
						{
							new Float:tempheal;
							GetPlayerHealth(playerid,tempheal);
							if ( tempheal < 100.0)
							{
								SetPlayerHealth(playerid,100.0);
								PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
								format(string, sizeof(string), "You have been healed to 100 health.");
								SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
							}
							else
							{
								SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
							}
						}
						else
						{
							format(string, sizeof(string), "This place does not have healing upgrades.");
							SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
						}
						return 1;
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/househeal", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);

            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_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                            SafeSetPlayerArmour(playerid, 50.0);
                        }
                        else
                        {
                            format(string, sizeof(string), "This place does not have armour upgrades.");
                            SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
                        }
                            if(HouseInfo[location][hHel] == 1)
                            {
                                new Float:tempheal;
                                GetPlayerHealth(playerid,tempheal);
                                    if ( tempheal < 100.0)
                                    {
                                        SetPlayerHealth(playerid,100.0);
                                        PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
                                        format(string, sizeof(string), "You have been healed to 100 health.");
                                        SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
                                    }
                                    else
                                    {
                                        SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
                                    }
                            }
                            else
                            {
                                format(string, sizeof(string), "This place does not have healing upgrades.");
                                SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
                            }
                    }
                }
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)