[Help] With two small things
#1

I'm having two irritating problems the one is i can't /openhouse from the inside I'VE tried everything that i know, and the other is when i type in /radio or something it sends the message twice, could anybody give me a little hint how to fix these problems?

This is how a message looks like when he types in /radio

Код:
				 		if(rank == 1)
						{
						  format(wstring, sizeof(wstring), "[Radio] %s %s: %s, over",DynamicFactions[faction][fRank1],GetPlayerNameEx(playerid),result);
						  SendFactionTypeMessage(1, COLOR_LSPD, wstring);
						  ProxDetector(20.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
						  FactionChatLog(wstring);
						}
It sends the message in a proxdetector and then in faction chat, i want it like that but could i do so that it only shows the message once for the player who typed it?

And my openhouse has some serious problems I cant open from the inside but from the outside i can, could anybody help me?

Код:
	if(strcmp(cmd, "/openhouse", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    for(new i = 0; i < sizeof(Houses); i++)
			{
				if(PlayerToPoint(10.0,playerid,Houses[i][EnterX], Houses[i][EnterY], Houses[i][EnterZ]) || PlayerToPoint(10.0,playerid,Houses[i][ExitX], Houses[i][ExitY], Houses[i][ExitInterior]) || PlayerToPoint(60,playerid,Houses[i][ExitX], Houses[i][ExitY], Houses[i][ExitZ]))
				{
					if(PlayerInfo[playerid][pHouseKey] == i)
					{
						if(Houses[i][Locked] == 1)
						{
							Houses[i][Locked] = 0;
							SendClientMessage(playerid, COLOR_WHITE, "[Info] Door Unlocked");
			        PlayerActionMessage(playerid,15.0,"puts in the housekey and opens the door");
			        SaveHouses();
							return 1;
						}
						if(Houses[i][Locked] == 0)
						{
							Houses[i][Locked] = 1;
							SendClientMessage(playerid, COLOR_WHITE, "[Info] Door Locked");
			        PlayerActionMessage(playerid,15.0,"puts in the housekey and locks the door");
			        SaveHouses();
							return 1;
						}
					}
					else
					{
						SendClientMessage(playerid, COLOR_GREY, "[Error] You do not have a key for this house");
						return 1;
					}
				}
			}
		}
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)