Jump to content
  • 0

Question

Posted

Salut am si eu o problema la comanda /exit cand cumpar o casa si vreau sa ies din casa nu merge sa dau /exit , daca imi dau respawn intru in casa si dau /exit merge ce trebuie sa fac ca sa mearga cand cumpar casa fara sa mai dau /restart?

2.Cum fac la hitman sa nu apara pe harta..?fara comanda /undercover.

9 answers to this question

Recommended Posts

Posted
if(strcmp(cmd, "/buyhouse", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			new Float:oldposx, Float:oldposy, Float:oldposz;
			GetPlayerName(playerid, playername, sizeof(playername));
			GetPlayerPos(playerid, oldposx, oldposy, oldposz);
			for(new h = 0; h < sizeof(HouseInfo); h++)
			{
				if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
				{
					if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
					{
						format(string, sizeof(string), "   You must be Level %d to purchase this !", HouseInfo[h][hLevel]);
						SendClientMessage(playerid, COLOR_GRAD5, string);
						return 1;
					}
					if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
					{
						SendClientMessage(playerid, COLOR_WHITE, "   You already own a house, type /sellhouse if you want to buy this one !");
						return 1;
					}
					if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
					{
						PlayerInfo[playerid][pPhousekey] = h;
						HouseInfo[h][hOwned] = 1;
						GetPlayerName(playerid, sendername, sizeof(sendername));
						strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
						GivePlayerMoney(playerid,-HouseInfo[h][hValue]);
						PlayerPlayMusic(playerid);
						SetPlayerInterior(playerid,HouseInfo[h][hInt]);
						SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
						GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
						PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
						PlayerInfo[playerid][pLocal] = h;
						SendClientMessage(playerid, COLOR_WHITE, "Congratulations, on your new Purchase !");
						SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section !");
						SendClientMessage(playerid, COLOR_LIGHTRED, "ATENTIE: Daca vinzi casa nu o sa primesti banii de la buy !");
                        DateProp(playerid);
						OnPropUpdate(1);
						OnPlayerUpdateEx(playerid);
						return 1;
					}
					else
					{
						SendClientMessage(playerid, COLOR_WHITE, "   You don't have the cash for that !");
						return 1;
					}
				}
			}
		}
		return 1;
	}

Posted

dai la search prin gm si vezi daca iti da rezultate la "HouseEntered"

Daca da, atunci la comanda /buyhouse inainte de

[pawn]DateProp(playerid);[/pawn]

adaugi deasupra liniei

[pawn]HouseEntered[playerid] = h;[/pawn]

Posted

Ms frumos pentru ajutor , poate cineva sa-mi zica cum rezolv si problema 2?

Arata-mi comanda /undercover

Posted

else if ((strcmp("Undercover", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Undercover")))

{

    tmp = strtok(text, idx);

    if ((strcmp("On", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("On")))

    {

        SendClientMessage(playerid, COLOR_WHITE, "Undercover On.");

  for(new i = 0; i < MAX_PLAYERS; i++)

    {

        SetPlayerColor(playerid,0xFFFFFF00);

    }

}

else if ((strcmp("Off", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Off")))

{

    SendClientMessage(playerid, COLOR_WHITE, "Undercover Off.");

      for(new i = 0; i < MAX_PLAYERS; i++)

    {

        SetPlayerColor(playerid,0xA63232FF);

    }

}

else

{

    SendClientMessage(playerid, COLOR_WHITE, "Undercover [On/Off]");

    return 0;

}

}

Rock eu vrea sa numai apara deloc pe harta..hitmanii

Posted

inlocuieste comanda veche cu asta

[pawn]

else if ((strcmp("Undercover", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Undercover")))

      {

          tmp = strtok(text, idx);

          if ((strcmp("On", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("On")))

          {

              SendClientMessage(playerid, COLOR_WHITE, "Undercover On.");

              for(new i = 0; i < MAX_PLAYERS; i++)

            {

                SetPlayerColor(playerid,0xFFFFFF00);

            }

        }

        else if ((strcmp("Off", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Off")))

        {

            SendClientMessage(playerid, COLOR_WHITE, "Undercover Off.");

                for(new i = 0; i < MAX_PLAYERS; i++)

            {

                SetPlayerColor(playerid,0xA6323200);

            }

        }

        else

        {

            SendClientMessage(playerid, COLOR_WHITE, "Undercover [On/Off]");

            return 0;

        }

      }

[/pawn]

Posted

Uite :

La

[pawn]public SetPlayerToTeamColor(playerid)

{

      if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)  //PS in cazul meu id de la factiunea hitman este 8 , nu stiu cum e la tine

      SetPlayerColor(playerid,0x72727200);

}[/pawn]

Posted

[pawn]

for ( new i = 0; i < MAX_PLAYERS; i++ )

{

    if ( PlayerInfo [ i ] [ pLeader ] == 8 || PlayerInfo [ i ] [ pMember ] == 8 )

    {

        SetPlayerColor ( i, 0xFFFFFF00 );

    }

}

[/pawn]

sau

[pawn]

for(new i = 0; i < MAX_PLAYERS; i++)

{

    if ( PlayerInfo [ i ] [ pLeader ] == 8 || PlayerInfo [ i ] [ pMember ] == 8 )

    {

        SetPlayerMarkerForPlayer(i,playerid,00);

    }

}

[/pawn]

Baga la OnGameModeInit una dintre astea nu stiu sigur cu care merge

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.