18.03.2013, 14:30
pawn Код:
OnGameModeInit
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
format(PropertyString,sizeof(PropertyString),"{F81414}Kukjata e na prodazba\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d\n {157DEC}Cena: {F3FF02}%d$",HouseInfo[h][hDiscription], HouseInfo[h][hLevel], HouseInfo[h][hValue]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0xAA3333AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],20, 0, 0);
HousePickup[h] = CreatePickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
else if(HouseInfo[h][hOwned] == 1 && HouseInfo[h][hRentabil] == 1)
{
format(PropertyString,sizeof(PropertyString),"{F81414}Kukja\n {157DEC}Vlasnik: {F3FF02}%s\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d",HouseInfo[h][hOwner], HouseInfo[h][hDiscription], HouseInfo[h][hLevel]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0xAA3333AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],20, 0, 0);
HousePickup[h] = CreatePickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
else if(HouseInfo[h][hOwned] == 1 && HouseInfo[h][hRentabil] != 1)
{
format(PropertyString,sizeof(PropertyString),"{F81414}Kukja\n {157DEC}Vlasnik: {F3FF02}%s\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d",HouseInfo[h][hOwner], HouseInfo[h][hDiscription], HouseInfo[h][hLevel]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0xAA3333AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],20, 0, 0);
HousePickup[h] = CreatePickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
format(PropertyString,sizeof(PropertyString),"{F81414}Biznis se Prodava\n {157DEC}Biznis: {F3FF02}%s\n {157DEC}Cena: {F3FF02}$%d\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d",BizzInfo[h][bMessage], BizzInfo[h][bBuyPrice], BizzInfo[h][bExtortion], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x33CCFFAA ,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],20, 0, 0);
BizzPickup[h] = CreatePickup(1272,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"{F81414}Biznis\n {157DEC}Biznis: {F3FF02}%s\n {157DEC}Gazda: {F3FF02}%s\n {157DEC}Cena na vlez: {F3FF02}%d$",BizzInfo[h][bMessage], BizzInfo[h][bOwner], BizzInfo[h][bEntranceCost]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x33CCFFAA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],20, 0, 0);
BizzPickup[h] = CreatePickup(1239, 1, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
}
}
for(new h = 0; h < sizeof(SBizzInfo); h++)
{
if(SBizzInfo[h][sbOwned] == 0)
{
format(PropertyString,sizeof(PropertyString),"{F81414}Biznis se Prodava\n {157DEC}Biznis: {F3FF02}%s\n {157DEC}Cena: {F3FF02}$%d\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d",SBizzInfo[h][sbMessage], SBizzInfo[h][sbBuyPrice], SBizzInfo[h][sbExtortion], SBizzInfo[h][sbLevelNeeded]);
SBizzLabel[h] = Create3DTextLabel(PropertyString ,0x33CCFFAA,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ],20, 0, 0);
SBizzPickup[h] = CreatePickup(1272, 1, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);
}
else if(SBizzInfo[h][sbOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"{F81414}Biznis\n {157DEC}Biznis: {F3FF02}%s\n {157DEC}Gazda: {F3FF02}%s\n {157DEC}Cena na vlez: {F3FF02}%d$",SBizzInfo[h][sbMessage], SBizzInfo[h][sbOwner], SBizzInfo[h][sbEntranceCost]);
SBizzLabel[h] = Create3DTextLabel(PropertyString , 0x33CCFFAA,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ],20, 0, 0);
SBizzPickup[h] = CreatePickup(1239, 1, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);
}
}
pawn Код:
public OnPropTextdrawUpdate(update, id)
{
new PropertyString[256];
if(update == 1)
{
if(HouseInfo[id][hOwned] == 0)
{
Delete3DTextLabel(HouseLabel[id]);
format(PropertyString,sizeof(PropertyString),"{F81414}Kukjata e na prodazba\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d\n {157DEC}Cena: {F3FF02}%d$",HouseInfo[id][hDiscription], HouseInfo[id][hLevel], HouseInfo[id][hValue]);
HouseLabel[id] = Create3DTextLabel(PropertyString ,0x48E31CAA,HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez]+0.5,20, 0, 1);
}
else if(HouseInfo[id][hOwned] == 1 && HouseInfo[id][hRentabil] == 1)
{
Delete3DTextLabel(HouseLabel[id]);
format(PropertyString,sizeof(PropertyString),"{F81414}Kukja\n {157DEC}Vlasnik: {F3FF02}%s\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d",HouseInfo[id][hOwner], HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
HouseLabel[id] = Create3DTextLabel(PropertyString ,0x48E31CAA,HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez]+0.5,20, 0, 1);
}
else if(HouseInfo[id][hOwned] == 1 && HouseInfo[id][hRentabil] != 1)
{
Delete3DTextLabel(HouseLabel[id]);
format(PropertyString,sizeof(PropertyString),"{F81414}Kukja\n {157DEC}Vlasnik: {F3FF02}%s\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d",HouseInfo[id][hOwner], HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
HouseLabel[id] = Create3DTextLabel(PropertyString ,0x48E31CAA,HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez]+0.5,20, 0, 1);
}
}
else if(update == 2)
{
if(BizzInfo[id][bOwned] == 0)
{
Delete3DTextLabel(BizzLabel[id]);
format(PropertyString,sizeof(PropertyString),"{F81414}Biznis se Prodava\n {157DEC}Biznis: {F3FF02}%s\n {157DEC}Cena: {F3FF02}$%d\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d",BizzInfo[id][bMessage], BizzInfo[id][bBuyPrice], BizzInfo[id][bExtortion], BizzInfo[id][bLevelNeeded]);
BizzLabel[id] = Create3DTextLabel(PropertyString ,0x33CCFFAA,BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ]+0.5,20, 0, 1);
}
else if(BizzInfo[id][bOwned] == 1)
{
Delete3DTextLabel(BizzLabel[id]);
format(PropertyString,sizeof(PropertyString),"{F81414}Biznis\n {157DEC}Biznis: {F3FF02}%s\n {157DEC}Gazda: {F3FF02}%s\n {157DEC}Cena na vlez: {F3FF02}%d$",BizzInfo[id][bMessage], BizzInfo[id][bOwner], BizzInfo[id][bEntranceCost]);
BizzLabel[id] = Create3DTextLabel(PropertyString ,0x33CCFFAA,BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ]+0.5,20, 0, 1);
}
}
else if(update == 3)
{
if(BizzInfo[id][bOwned] == 0)
{
Delete3DTextLabel(BizzLabel[id]);
format(PropertyString,sizeof(PropertyString),"{F81414}Biznis se Prodava\n {157DEC}Biznis: {F3FF02}%s\n {157DEC}Cena: {F3FF02}$%d\n {157DEC}Opis: {F3FF02}%s\n {157DEC}Level: {F3FF02}%d",SBizzInfo[id][sbMessage], SBizzInfo[id][sbBuyPrice], SBizzInfo[id][sbExtortion], SBizzInfo[id][sbLevelNeeded]);
BizzLabel[id] = Create3DTextLabel(PropertyString ,0x33CCFFAA,BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ]+0.5,20, 0, 1);
}
else if(BizzInfo[id][bOwned] == 1)
{
Delete3DTextLabel(BizzLabel[id]);
format(PropertyString,sizeof(PropertyString),"{F81414}Biznis\n {157DEC}Biznis: {F3FF02}%s\n {157DEC}Gazda: {F3FF02}%s\n {157DEC}Cena na vlez: {F3FF02}%d$",SBizzInfo[id][sbMessage], SBizzInfo[id][sbOwner], SBizzInfo[id][sbEntranceCost]);
BizzLabel[id] = Create3DTextLabel(PropertyString ,0x33CCFFAA,BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ]+0.5,20, 0, 1);
}
}
return 1;
}