09.08.2014, 15:18
Forgot to add the command:
Код:
CMD:maketext(playerid,params[]) { if(sscanf(params,"s[128]",params[0])) return SendClientMessage(playerid,-1,"[Usage]: /maketext [Text-string]"); new gQuery[356], Float: gPos[MAX_PLAYERS][3]; tInfo[playerid][t_id] ++; GetPlayerPos(playerid,gPos[playerid][0],gPos[playerid][1],gPos[playerid][2]); format(gQuery, sizeof(gQuery), "INSERT INTO textlabel(`t_id_`,`t_text`,`t_color_`,`t_x`,`t_y`,`t_z`) VALUES ('%d', '%s', '%s', '%f', '%f', '%f')", tInfo[playerid][t_id],params[0],"red",gPos[playerid][0],gPos[playerid][1],gPos[playerid][2]); mysql_function_query(conn, gQuery, false, "", ""); for(new i,j = MAX_TEXT; i != j; i++) tInfo[i][t_id] ++; tInfo[playerid][t_label] = Create3DTextLabel(params[0],0xED1414FF,gPos[playerid][0],gPos[playerid][1],gPos[playerid][2],40.0,0,0); SendClientMessage(playerid,-1,"[Success]: you successuflly created a textlabel!"); return 1; }