20.07.2017, 11:48
PHP код:
Rack_Refresh(rackid)
{
if (rackid != -1 && RackData[rackid][rackExists])
{
static
str[64];
if (IsValidDynamicObject(RackData[rackid][rackObjects][4])) {
DestroyDynamicObject(RackData[rackid][rackObjects][4]);
}
if (IsValidDynamic3DTextLabel(RackData[rackid][rackText3D])) {
DestroyDynamic3DTextLabel(RackData[rackid][rackText3D]);
}
format(str, sizeof(str), "[Rack %d]\n{FFFFFF}/gunrack to use this rack.", rackid);
RackData[rackid][rackText3D] = CreateDynamic3DTextLabel(str, COLOR_DARKBLUE, RackData[rackid][rackPos][0], RackData[rackid][rackPos][1], RackData[rackid][rackPos][2] + 1.2, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, RackData[rackid][rackWorld], RackData[rackid][rackInterior]);
Rack_RefreshGuns(rackid);
RackData[rackid][rackObjects][4] = CreateDynamicObject(2475, RackData[rackid][rackPos][0], RackData[rackid][rackPos][1], RackData[rackid][rackPos][2], 0.0, 0.0, RackData[rackid][rackPos][3], RackData[rackid][rackWorld], RackData[rackid][rackInterior]);
printf("rack id = %i", rackid);
}
return 1;
}