20.10.2014, 17:35
try this
and suggestion try using zcmd its better
pawn Код:
#include <a_samp>
#define MAX_TXDS 2
#define dcmd(%1,%2,%3) if((strcmp((%3)[1],#%1,true,(%2))==0)&&((((%3)[(%2)+1]==0)&&(dcmd_%1(playerid,"")))||(((%3)[(%2)+1]==32)&&(dcmd_%1(playerid,(%3)[(%2)+2]))))) return 1
new Text:textid[MAX_TXDS];
enum TextDraws_
{
Float:pos_x,
Float:pos_y,
nameofTEXT[68],
Float:letter_x,
Float:letter_y,
Float:textsiz_x,
Float:textsiz_y,
align,
col,
shad,
outl,
bckgrocol,
font,
propo,
bool:select
}
new TextCreates[MAX_TXDS][TextDraws_] =
{
{ 49.599979, 158.293395, "Hlavni budova", 0.311599, 1.301333, 128.000, 15.0000, 1, -1, 0, 1, 51, 1, 1, true },//47
{ 49.599979, 158.293395, "Hlavni budova", 0.311599, 1.301333, 128.000, 15.0000, 1, -1, 0, 1, 51, 1, 1, true }
};//49
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(test, 4, cmdtext);
return 0;
}
dcmd_test(playerid, params[])
{
#pragma unused params
#pragma unused playerid
for(new i=0;i<=MAX_TXDS;i++)
{
textid[i] = TextDrawCreate(TextCreates[i][pos_x], TextCreates[i][pos_y], TextCreates[i][nameofTEXT]);
TextDrawLetterSize(TextCreates[i][textid], TextCreates[i][letter_x],TextCreates[i][letter_y]);
TextDrawTextSize(TextCreates[i][textid], TextCreates[i][textsiz_x],TextCreates[i][textsiz_y]);
TextDrawAlignment(TextCreates[i][textid], TextCreates[i][align]);
TextDrawColor(TextCreates[i][textid], TextCreates[i][col]);
TextDrawSetShadow(TextCreates[i][textid], TextCreates[i][shad]);
TextDrawSetOutline(TextCreates[i][textid], TextCreates[i][outl]);
TextDrawBackgroundColor(TextCreates[i][textid], TextCreates[i][bckgrocol]);
TextDrawFont(TextCreates[i][textid], TextCreates[i][font]);
TextDrawSetProportional(TextCreates[i][textid], TextCreates[i][propo]);
TextDrawSetSelectable(TextCreates[i][textid], TextCreates[i][select]);
}
return 1;
}