03.01.2010, 11:12
Quote:
Originally Posted by [03
Garsino ]
Quote:
^That one. ([REL]Streamer Plugin v2.3.3) dunno if yours is better tho :P |
pawn Code:
PickupID[ID] = CreatePickup(1273, 23, Pickupx, Pickupy, Pickupz, -1); //Creates the pickup :).
pawn Code:
PickupID[ID] = CreateDynamicCP(Pickupx, Pickupy, Pickupz, 3, 0, 0, -1, 25);
pawn Code:
SetTimer("Timer", 100, true);
public Timer()
{
for(new i; i<MAX_PLAYERS; i++)
{
for(new A; A<1000; A++) //Change 1000 to your amount of CP'S
{
if(IsPlayerInDynamicCP(i, A)) OnPlayerEnterStreamedCP(i, A)
}
}
return 1;
}
stock OnPlayerEnterStreamedCP(playerid, CPID)
{
for(new J; J<MAX_HOUSES; J++) //Loops through all houses
{
if(CPID == PickupID[J])
{
new str[75];
if(HouseInfo[J][Owned] == 1)
{
format(str, sizeof(str), "~r~House Info~n~~g~Owner: ~w~%s", HouseInfo[J][HouseOwner]);
}
if(HouseInfo[J][Owned] == 0)
{
format(str, sizeof(str), "~r~House Info~n~~g~Owner: ~w~Nobody");
SendClientMessage(playerid, 0x67F6F6AA, "This house is up for sale! Type /buy to buy it");
}
new str2[75];
format(str2, sizeof(str2), "~g~Cost price:~w~%d ~w~%d~n~~g~Sell Price:~w~ %d", HouseInfo[J][HouseCost], HouseInfo[J][HouseSell]);
new str3[150];
format(str3, sizeof(str3), "%s~n~%s", str, str2);
GameTextForPlayer(playerid, str3, 3500, 3);
}
}
}