Jump to content

Putin ajutor cu mysql


Vespa97

Recommended Posts

CMD:loadjobs(playerid,params[])
{
    if(P_Data[playerid][pAdmin] < 4)
        return SCM(playerid, albastru, "Nu ai rangul administrativ necesar");
    else
    {
        new Float:x,y,z;
        new query[100];// definim query(interogare)
        for(new i=1;i<=10;i++)
        {
        mysql_format(handle, query, sizeof(query),"SELECT PosX='%f',PosY='%f' ,PosZ='%f' FROM jobs WHERE ID='%i'",x,y,z,i);
        Create3DTextLabel("Tasteaza [/angajare] daca vrei sa te angajezi!", 0x008080FF, x,y,z, 40.0, 0, 0);
        }
    }
    return 1;
}

 

Nu imi ia date din baza de date.

Link to comment
Share on other sites

1 minute ago, Vespa97 said:
CMD:loadjobs(playerid,params[])
{
    if(P_Data[playerid][pAdmin] < 4)
        return SCM(playerid, albastru, "Nu ai rangul administrativ necesar");
    else
    {
        new Float:x,y,z;
        new query[100];// definim query(interogare)
        for(new i=1;i<=10;i++)
        {
        mysql_format(handle, query, sizeof(query),"SELECT PosX='%f',PosY='%f' ,PosZ='%f' FROM jobs WHERE ID='%i'",x,y,z,i);
        Create3DTextLabel("Tasteaza [/angajare] daca vrei sa te angajezi!", 0x008080FF, x,y,z, 40.0, 0, 0);
        }
    }
    return 1;
}

 

Nu imi ia date din baza de date.

1.nu ai respectat modelul de la ajutor Scripting.

2.Cum vrei sa.ti extragă dacă tu nu ai trimis interogarea către baza de date, sub mysql_format îți lipsește mysql_query

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

Problema intalnita (descriere):Nu imi ia datele din baza de date
Ero(area / rile) / warning-(ul / urile):Nu am
Liniile de cod / sursa / script-ul(obligatoriu)

CMD:loadjobs(playerid,params[])
{
    if(P_Data[playerid][pAdmin] < 4)
	    return SCM(playerid, albastru, "Nu ai rangul administrativ necesar");
	else
	{
        new Float:x,y,z;
		new query[100];// definim query(interogare)
		new string[100];
		for(new i=1;i<=10;i++)
		{
		mysql_format(handle, query, sizeof(query),"SELECT FROM jobs WHERE ID='%i' PosX='%f',PosY='%f' ,PosZ='%f'",i,x,y,z);
		mysql_query(handle, query);
		Create3DTextLabel("Tasteaza [/angajare] daca vrei sa te angajezi!", 0x008080FF, x,y,z, 40.0, 0, 0);
		format(string,sizeof(string),"x=%f y=%f z=%f \n", x,y,z);
		SCM(playerid,rosu,string);
	    }
	}
	return 1;
}

:
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Cod-ul este creat de mine.

Link to comment
Share on other sites

3 hours ago, Vespa97 said:
CMD:loadjobs(playerid,params[])
{
    if(P_Data[playerid][pAdmin] < 4)
        return SCM(playerid, albastru, "Nu ai rangul administrativ necesar");
    else
    {
        new Float:x,y,z;
        new query[100];// definim query(interogare)
        for(new i=1;i<=10;i++)
        {
        mysql_format(handle, query, sizeof(query),"SELECT PosX='%f',PosY='%f' ,PosZ='%f' FROM jobs WHERE ID='%i'",x,y,z,i);
        Create3DTextLabel("Tasteaza [/angajare] daca vrei sa te angajezi!", 0x008080FF, x,y,z, 40.0, 0, 0);
        }
    }
    return 1;
}

 

Nu imi ia date din baza de date.

Trebuie sa faci alt topic, si ti.am zis care e problema, T/C.

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.