Jackal
20.11.2015, 14:51
При вводе команды, появляется только объект, но без текста. Как создать текст?
CMD:newtext(playerid)
{
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,Float:pX,Float:pY,Float:pZ);
new objectid = CreateDynamicObject(19353, Float:pX+3, Float:pY, Float:pZ, 0.0, 0.0, 0.0, 0, 0, -1, 200);
SetDynamicObjectMaterialText(objectid, 0, "{FF0000}Text", OBJECT_MATERIAL_SIZE_256x128, "Arial", 24, 1, 0xFFFFFFFF, 0, 0);
return 1;
}
streamer.inc
/*
* Copyright (C) 2014 Incognito
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
native SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
CMD:newtext(playerid)
{
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,Float:pX,Float:pY,Float:pZ);
new objectid = CreateDynamicObject(19353, Float:pX+3, Float:pY, Float:pZ, 0.0, 0.0, 0.0, 0, 0, -1, 200);
SetDynamicObjectMaterialText(objectid, 0, "{FF0000}Text", OBJECT_MATERIAL_SIZE_256x128, "Arial", 24, 1, 0xFFFFFFFF, 0, 0);
return 1;
}
streamer.inc
/*
* Copyright (C) 2014 Incognito
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
native SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);