mysql error
#6

Edited command:

Код:
COMMAND:maketext(playerid,params[])
{
    if(sscanf(params,"s[128]s[24]",params[0],params[1]))
        return SendClientMessage(playerid,-1,"[Usage]: /maketext [Text-string] [color (red/blue/orange/green)]");
    if(tInfo[playerid][t_id] >= MAX_TEXT)
        return SendClientMessage(playerid,-1,"[Error]: you cannot to create more textlabels, because you create a many textlabels, please delete some textlables!");
    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],tInfo[playerid][t_string],tInfo[playerid][t_color],gPos[playerid][0],gPos[playerid][1],gPos[playerid][2]);
	mysql_function_query(conn, gQuery, false, "OnQuerySend", "", playerid); // 67
	for(new i,j = MAX_TEXT; i != j; i++) tInfo[i][t_id] ++;
    if(!strcmp(params[1],"blue",true)) tInfo[playerid][t_label] = Create3DTextLabel(params[0],0x1492EDFF,gPos[playerid][0],gPos[playerid][1],gPos[playerid][2],40.0,0,0);
    if(!strcmp(params[1],"red",true)) tInfo[playerid][t_label] = Create3DTextLabel(params[0],0xED1414FF,gPos[playerid][0],gPos[playerid][1],gPos[playerid][2],40.0,0,0);
    if(!strcmp(params[1],"green",true)) tInfo[playerid][t_label] = Create3DTextLabel(params[0],0x25ED14FF,gPos[playerid][0],gPos[playerid][1],gPos[playerid][2],40.0,0,0);
    if(!strcmp(params[1],"orange",true)) tInfo[playerid][t_label] = Create3DTextLabel(params[0],0xED9614FF,gPos[playerid][0],gPos[playerid][1],gPos[playerid][2],40.0,0,0);
    SendClientMessage(playerid,-1,"[Success]: you successuflly created a textlabel!");
    return 1;
}
Reply


Messages In This Thread
mysql error - by BizzyD - 09.08.2014, 10:50
Respuesta: mysql error - by Xabi - 09.08.2014, 11:11
Re: mysql error - by BizzyD - 09.08.2014, 11:35
Re: mysql error - by BizzyD - 09.08.2014, 11:44
Re: mysql error - by Matess - 09.08.2014, 11:49
Re: mysql error - by BizzyD - 09.08.2014, 11:52
Re: mysql error - by Matess - 09.08.2014, 11:59
Re: mysql error - by BizzyD - 09.08.2014, 12:06
Re: mysql error - by BizzyD - 09.08.2014, 12:41
Re: mysql error - by BizzyD - 09.08.2014, 13:42

Forum Jump:


Users browsing this thread: 4 Guest(s)