23.01.2015, 09:15
(
Последний раз редактировалось Zyova; 23.01.2015 в 09:25.
Причина: change title
)
./includes/commands.pwn(55562) : error 017: undefined symbol "ctstring" this why?please help.
*But i have this enum
*But i have this enum
PHP код:
enum customTextEnum
{
bool:ctExists,
ctString[255],
ctColor,
ctFont[32],
Float:ctX,
Float:ctY,
Float:ctZ,
Float:ctRX,
Float:ctRY,
Float:ctRZ,
ctSize,
ctModel,
ctBackColor,
ctObjectID
};
PHP код:
CMD:createcustomtext(playerid, params[])
{
new cmdtext[255];
new string1[512];
new tmp1[150];
new idx;
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
tmp1 = strtok(cmdtext, idx);
if (!strlen(tmp1))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /createcustomtext [text]");
return 1;
}
strmid(tmp1, cmdtext, strfind(cmdtext, " ") + 1, strlen(cmdtext));
for (new i = 0; i < MAX_CUSTOM_TEXTS; i ++)
{
if (!CustomTextEnum[i][ctExists])
{
new Float:x3, Float:y3, Float:z3, Float:a1;
GetPlayerPos(playerid, x3, y3, z3);
GetPlayerFacingAngle(playerid, a1);
x3 += (4.0 * floatsin(-a1, degrees));
y3 += (4.0 * floatcos(a1, degrees));
z3 += 5.5;
CustomTextEnum[i][ctExists] = true;
format(CustomTextEnum[i][ctstring], 255, tmp1);
CustomTextEnum[i][ctColor] = 0xFF000000;
format(CustomTextEnum[i][ctFont], 32, "Arial");
CustomTextEnum[i][ctX] = x3;
CustomTextEnum[i][ctY] = y3;
CustomTextEnum[i][ctZ] = z3;
CustomTextEnum[i][ctRX] = 0.0;
CustomTextEnum[i][ctRY] = 0.0;
CustomTextEnum[i][ctRZ] = a1 - 180;
CustomTextEnum[i][ctObjectID] = CreateDynamicObject(2885, x3, y3, z3, 0.0, 0.0, a1);
CustomTextEnum[i][ctSize] = 24;
CustomTextEnum[i][ctModel] = 2885;
CustomTextEnum[i][ctBackColor] = 0xFFFFFFFF;
SetDynamicObjectMaterialText(CustomTextEnum[i][ctObjectID], 0, Wrap(tmp1), _, _, _, _, 0xFF000000, 0xFFFFFFFF, 1);
format(string1, sizeof(string1), "You have created a custom text (ID: %d).", i);
SendClientMessage(playerid, -1, string1);
format(string1, sizeof(string1), "INSERT INTO `CustomTexts` (`ctID`) VALUES('%d')", i);
db_query(CustomTextDB, string1);
SaveCustomText(i);
return 1;
}
}
SendClientMessage(playerid, 0xAFAFAFFF, "You cannot spawn any more custom texts.");
return 1;
}
else SendClientMessage(playerid, 0xAFAFAFFF, "You are not authorized to use this command.");
return 1;
}