08.11.2013, 10:29
somebody please tell me why is houseid is always "0" in the dynamic 3D text, when i create another checkpoint, it keeps 0.
pawn Код:
#define MAX_HOUSES 1000
enum hinfo
{
hPrice,
hInt,
hVW,
hID
}
new HouseInfo[MAX_HOUSES][hinfo];
CMD:ch(playerid, params[])
{
new price, inti, vw, ID, houseid, string[128];
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x,y,z);
if(sscanf(params, "iii", price, inti, vw)) return SendClientMessage(playerid, COLOR_WHITE, "/ch [price] [inti] [vw]");
ID = HouseInfo[houseid][hID];
CreateDynamicCP(x,y,z,1.0,-1,-1,-1,30.0);
format(string, sizeof(string), "House ID: %i\nPrice: %i", ID, price);
CreateDynamic3DTextLabel(string, COLOR_WHITE, x,y,z, 50.0);
return 1;
}