Modul pe care il folosesti suge,eGamer sau ceva gen
Explic doar o data,daca nu'ti iese,domnu cu mila,dar intai sterge tot ce e cu 3dText(apasa ctrl+h,scrie 3dText,sterge tot ce iti apare in cale-toate liniile,apoi scrie text3d si sterge si alea)
La enum hInfo pui Text3D:hTextInfo, - ultima de preferat
La enum bInfo pui Text3D:bTextInfo, - -||-
La enum sbInfo pui Text3D: sbTextInfo,
La OnGameModeInit,cand creaza pickupurile,pui asta: (daca nu gasesti,ctrl+f si dai HouseInfo[h][hEntrancex],HouseInfo[h] - sa fie ceva legat de pickup)
pawn Код:
for(new h = 0; h < sizeof(HouseInfo); h++) { /* if(HouseInfo[h][hHel] == 1) { AddStaticPickup(1240, 2, HouseInfo[h][hHealthx], HouseInfo[h][hHealthy], HouseInfo[h][hHealthz]); pickups++; } if(HouseInfo[h][hArm] == 1) { AddStaticPickup(1242, 2, HouseInfo[h][hArmourx], HouseInfo[h][hArmoury], HouseInfo[h][hArmourz]); pickups++; } */ new bstr[256]; if(HouseInfo[h][hOwned] == 0) { format(bstr, sizeof(bstr), "House %d\n[De Vanzare]\nPret:${FFFFFF}%d\n{2CDBDE}Level:{FFFFFF}%d",h,HouseInfo[h][hValue],HouseInfo[h][hLevel]); HouseInfo[h][hTextInfo] = Create3DTextLabel(bstr,0x2CDBDEFF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1); AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]); CreateDynamicMapIcon(HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancey],HouseInfo[h][hEntrancez],31,0); pickups++; } if(HouseInfo[h][hOwned] == 1) { format(bstr, sizeof(bstr), "House %d\nOwner:{FFFFFF}%s\n{2CDBDE}Level:{FFFFFF}%d\n{2CDBDE}Rent:${FFFFFF}%d",h,HouseInfo[h][hOwner],HouseInfo[h][hLevel],HouseInfo[h][hRent]); HouseInfo[h][hTextInfo] = Create3DTextLabel(bstr,0x2CDBDEFF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1); AddStaticPickup(1239, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]); CreateDynamicMapIcon(HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancey],HouseInfo[h][hEntrancez],32,0); pickups++; } } for(new h = 0; h < sizeof(BizzInfo); h++) { if(BizzInfo[h][bOwned] == 0) { format(bstr, sizeof(bstr), "Bizz %d\n[De Vanzare]\nPret:${FFFFFF}%d\n{2CDBDE}Level:{FFFFFF}%d",h,BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]); BizzInfo[h][bTextInfo] = Create3DTextLabel(bstr,0x2CDBDEFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]+1,15,0,1); AddStaticPickup(1274, 2, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]); pickups++; } if(BizzInfo[h][bOwned] == 1) { format(bstr, sizeof(bstr), "Bizz %d\nOwner:{FFFFFF}%s\n{2CDBDE}Entrance Cost:{FFFFFF}%d",h,BizzInfo[h][bOwner],BizzInfo[h][bEntranceCost]); BizzInfo[h][bTextInfo] = Create3DTextLabel(bstr,0x2CDBDEFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]+1,15,0,1); AddStaticPickup(1239, 2, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]); pickups++; } } for(new h = 0; h < sizeof(SBizzInfo); h++) { if(SBizzInfo[h][sbOwned] == 0) { format(bstr, sizeof(bstr), "SBizz %d\n[De Vanzare]\nPret:${FFFFFF}%d\n{2CDBDE}Level:{FFFFFF}%d",h,SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]); SBizzInfo[h][sbTextInfo] = Create3DTextLabel(bstr,0x8361FFFF,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]+1,15,0,1); AddStaticPickup(1274, 2, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]); pickups++; } if(SBizzInfo[h][sbOwned] == 1) { format(bstr, sizeof(bstr), "Bizz %d\nOwner:{FFFFFF}%s\n{2CDBDE}Price Prod:{FFFFFF}%d",h,SBizzInfo[h][sbOwner],SBizzInfo[h][sbPriceProd]); SBizzInfo[h][sbTextInfo] = Create3DTextLabel(bstr,0x8361FFFF,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]+1,15,0,1); AddStaticPickup(1239, 2, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]); pickups++; } }
La OnPropUpdate pui astea (ai grija sa fi sters celaltele):
pawn Код:
if(HouseInfo[idx][hOwned]==0) { format(coordsstring, sizeof(coordsstring), "House %d\n[De Vanzare]\nPret:${FFFFFF}%d\n{2CDBDE}Level:{FFFFFF}%d",idx,HouseInfo[idx][hValue],HouseInfo[idx][hLevel]); Update3DTextLabelText (HouseInfo[idx][hTextInfo],0x2CDBDEFF,coordsstring); }else { format(coordsstring, sizeof(coordsstring), "House %d\nOwner:{FFFFFF}%s\n{2CDBDE}Level:{FFFFFF}%d\n{2CDBDE}Rent:${FFFFFF}%d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hLevel],HouseInfo[idx][hRent]); Update3DTextLabelText (HouseInfo[idx][hTextInfo],0x2CDBDEFF,coordsstring); }
pawn Код:
if(BizzInfo[idx][bOwned]==0) { format(coordsstring, sizeof(coordsstring), "Bizz %d\n[De Vanzare]\nPret:${FFFFFF}%d\n{2CDBDE}Level:{FFFFFF}%d",idx,BizzInfo[idx][bBuyPrice],BizzInfo[idx][bLevelNeeded]); Update3DTextLabelText (BizzInfo[idx][bTextInfo],0x2CDBDEFF,coordsstring); }else{ format(coordsstring, sizeof(coordsstring), "Bizz %d\nOwner:{FFFFFF}%s\n{2CDBDE}Entrance Cost:{FFFFFF}%d",idx,BizzInfo[idx][bOwner],BizzInfo[idx][bEntranceCost]); Update3DTextLabelText (BizzInfo[idx][bTextInfo],0x2CDBDEFF,coordsstring); }
pawn Код:
if(SBizzInfo[idx][sbOwned]==0) { format(coordsstring, sizeof(coordsstring), "SBizz %d\n[De Vanzare]\nPret:${FFFFFF}%d\n{2CDBDE}Level:{FFFFFF}%d",idx,SBizzInfo[idx][sbBuyPrice],SBizzInfo[idx][sbLevelNeeded]); Update3DTextLabelText (SBizzInfo[idx][sbTextInfo],0x2CDBDEFF,coordsstring); }else{ format(coordsstring, sizeof(coordsstring), "Bizz %d\nOwner:{FFFFFF}%s\n{2CDBDE}Price Prod:{FFFFFF}%d",idx,SBizzInfo[idx][sbOwner],SBizzInfo[idx][sbPriceProd]); Update3DTextLabelText (SBizzInfo[idx][sbTextInfo],0x2CDBDEFF,coordsstring); }
Daca nu'ti iese,ia din nou .
|