19.08.2015, 18:55
(
Последний раз редактировалось Toxik; 19.08.2015 в 18:55.
Причина: CODES
)
so I made a house system .
witch allow normal houses to buy
free houses to enter like ((Safe zone))
and I want in this code if is possible to make if player have [GC] Tag in name he can enter
if not send message (You are not in [GC] Clan please Leave the Building to prevent Shoots from anywhere)
witch allow normal houses to buy
free houses to enter like ((Safe zone))
and I want in this code if is possible to make if player have [GC] Tag in name he can enter
if not send message (You are not in [GC] Clan please Leave the Building to prevent Shoots from anywhere)
pawn Код:
AddGCHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
if(!dini_Exists(house))
{
dini_Create(house);
hInfo[houseid][Interior] = Interiora;
dini_IntSet(house, "Interior", Interiora);
dini_IntSet(house, "Virtualworld", virtualworld);
hInfo[houseid][Virtualworld] = virtualworld;
hInfo[houseid][InteriorX] = interiorX;
hInfo[houseid][InteriorY] = interiorY;
hInfo[houseid][InteriorZ] = interiorZ;
dini_FloatSet(house, "X", interiorX);
dini_FloatSet(house, "Y", interiorY);
dini_FloatSet(house, "Z", interiorZ);
print("-");
print("--------------House Created--------------");
printf("- Houseid: %d", houseid);
printf("- Buy Cost: %d", Costa);
printf("- Sell Cost: %d", Sella);
printf("- Interior: %d", Interiora);
printf("- VirtualWorld: %d", virtualworld);
print("-----------------------------------------");
print("-");
}
else
{
hInfo[houseid][Interior] = dini_Int(house, "Interior");
hInfo[houseid][Locked] = dini_Int(house, "Locked");
hInfo[houseid][InteriorX] = dini_Float(house, "X");
hInfo[houseid][InteriorY] = dini_Float(house, "Y");
hInfo[houseid][InteriorZ] = dini_Float(house, "Z");
hInfo[houseid][Virtualworld] = dini_Int(house, "Virtualworld");
}
hInfo[houseid][iconx]=iconX;
hInfo[houseid][icony]=iconY;
hInfo[houseid][iconz]=iconZ;
format(house, sizeof(house), "Houses/houseid%d",houseid);
if(strcmp(hInfo[houseid][Name],"ForSale",true)==0)
{
HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ);//not bought
}
else
{
HousePickup[houseid] = CreatePickup(1272,23, iconX, iconY, iconZ);//bought
}
}