House Owner TextDraw - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: House Owner TextDraw (
/showthread.php?tid=445538)
House Owner TextDraw -
Jay_Dixon - 21.06.2013
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;
}
Respuesta: House Owner TextDraw -
JustBored - 21.06.2013
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;
}