House Owner TextDraw
#1

Ok well, it has no problem when it says "For Sale" but when i try to make it display the house owner, the script goes psychotic on me, what am i doing wrong? O.O

Код:
C:\Users\Jay\Desktop\FRP\gamemodes\ECRP.pwn(19747) : warning 213: tag mismatch
C:\Users\Jay\Desktop\FRP\gamemodes\ECRP.pwn(39690) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
			{
			    new string[20];
	            HouseInfo[house][EBill] = 0;
	            HouseInfo[house][Lights] = 0;
			    HouseInfo[house][Owned] = 1;
			    HouseInfo[house][Rentable] = 0;
			    HouseInfo[house][Rent] = 0;
			    HouseInfo[house][Locked] = 0;
			    format(HouseInfo[house][Renter], 24, "No-One");
				format(HouseInfo[house][Owner], 24, "%s", PlayerName(playerid));
				DestroyDynamicPickup(HouseInfo[house][PickupID]);
				HouseInfo[house][PickupID] = CreateDynamicPickup(1272, 16, HouseInfo[house][EntranceX], HouseInfo[house][EntranceY], HouseInfo[house][EntranceZ]);
				GivePlayerMoneyEx(playerid, -HouseInfo[house][Price]);
				//UpdateDynamic3DTextLabelText(HouseInfo[house][TextID], 0x2BFF00AA, " ", string);
				CreateDynamic3DTextLabel("Owner: %s",string, COLOR_GREEN, HouseInfo[house][EntranceX], HouseInfo[house][EntranceY], HouseInfo[house][EntranceZ], HouseInfo[house][Owner] + 1, 50.0);
				SetPlayerInterior(playerid, HouseInfo[house][Interior]);
				SetPlayerPos(playerid, HouseInfo[house][ExitX], HouseInfo[house][ExitY], HouseInfo[house][ExitZ]);
				TextDrawShowForPlayer(playerid, HouseLightsText);
				SetPlayerVirtualWorld(playerid, HouseInfo[house][VirtualWorld]);
				PlayerInfo[playerid][pLocal] = 1000+house;
				SendClientMessage(playerid, COLOR_LIGHTGREEN, "* Congratulations on your purchase!");
				GameTextForPlayer(playerid, "~y~property purchased", 4000, 1);
				PlayerInfo[playerid][pHouses] ++;
				UpdateHouse(house);
				UpdatePlayer(playerid);
				return 1;
			}
Reply
#2

pawn Код:
{
                new string[20];
                HouseInfo[house][EBill] = 0;
                HouseInfo[house][Lights] = 0;
                HouseInfo[house][Owned] = 1;
                HouseInfo[house][Rentable] = 0;
                HouseInfo[house][Rent] = 0;
                HouseInfo[house][Locked] = 0;
                format(HouseInfo[house][Renter], 24, "No-One");
                format(HouseInfo[house][Owner], 24, "%s", PlayerName(playerid));
                DestroyDynamicPickup(HouseInfo[house][PickupID]);
                HouseInfo[house][PickupID] = CreateDynamicPickup(1272, 16, HouseInfo[house][EntranceX], HouseInfo[house][EntranceY], HouseInfo[house][EntranceZ]);
                GivePlayerMoneyEx(playerid, -HouseInfo[house][Price]);
                //UpdateDynamic3DTextLabelText(HouseInfo[house][TextID], 0x2BFF00AA, " ", string);
                                format(string, sizeof(string), "Owner: %s", HouseInfo[house][Owner]);              
CreateDynamic3DTextLabel(string, COLOR_GREEN, HouseInfo[house][EntranceX], HouseInfo[house][EntranceY], HouseInfo[house][EntranceZ], 50.0);
                SetPlayerInterior(playerid, HouseInfo[house][Interior]);
                SetPlayerPos(playerid, HouseInfo[house][ExitX], HouseInfo[house][ExitY], HouseInfo[house][ExitZ]);
                TextDrawShowForPlayer(playerid, HouseLightsText);
                SetPlayerVirtualWorld(playerid, HouseInfo[house][VirtualWorld]);
                PlayerInfo[playerid][pLocal] = 1000+house;
                SendClientMessage(playerid, COLOR_LIGHTGREEN, "* Congratulations on your purchase!");
                GameTextForPlayer(playerid, "~y~property purchased", 4000, 1);
                PlayerInfo[playerid][pHouses] ++;
                UpdateHouse(house);
                UpdatePlayer(playerid);
                return 1;
            }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)