native mysql_connect(const host[], const user[], const pass[], const db[], MySQL:handle = (MySQL:0), auto_reconnect = 0);
//edit: habe a_mysql als include rausgenommen, hatte das und mysql als include. Doch jetzt bekomme ich folgende Errors:
C:\Users\Niklas\Desktop\Reallife\Script\gamemodes\rl.pwn(37934) : error 017: undefined symbol "mysql_function_query"C:\Users\Niklas\Desktop\Reallife\Script\gamemodes\rl.pwn(37964) : error 017: undefined symbol "mysql_function_query"
if(strcmp(cmd, "/parkkralle", true) == 0)
{
if(SpielerInfo[playerid][sMember] == 18)
{
new Float:bX,Float:bY,Float:bZ;
GetPlayerPos(playerid,bX,bY,bZ);
new Float:aX,Float:aY,Float:aZ;
new x_nr[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "============= [Parkkralle] =============");
SendClientMessage(playerid, COLOR_RED, "FEHLER: /parkkralle [name]");
SendClientMessage(playerid, COLOR_GREY, "Verfügbare Namen: Anbauen, Abbauen");
SendClientMessage(playerid, COLOR_WHITE, "============= [Parkkralle] =============");
return 1;
}
x_nr = tmp;
if(strcmp(x_nr,"Anbauen",true) == 0)
{
for(new vid;vid!=MAX_VEHICLES;vid++)
{
GetVehiclePos(vid,aX,aY,aZ);
if((floatabs(bX-aX)<3.0)&&(floatabs(bY-aY)<3.0)&&(floatabs(bZ-aZ)<3.0)&&(vid!=GetPlayerVehicleID(playerid)))
{
if(!IsADtCar(vid))
{
SendClientMessage(playerid,0x33CCFFAA,"Du kannst nur an Spielerfahrzeugen eine Parkkralle anbringen!");
return 1;
}
else
{
//Wird gemacht
new theOwner = GetOwner(vid);
new xid;
for(new x;x!=MaxVeh;x++)
{
if(Dtc_PlayerHaveCar[playerid][x])
{
if(vid == PlayerCar[theOwner][x][CarId])
{
xid = x;
break;
}
}
}
PlayerCar[theOwner][xid][Kralle] = 1;
format(globquery,256,"UPDATE `carsystem` SET `Kralle`='1' WHERE `CarOwner`='%s_%d'",GetName(playerid),xid);
mysql_function_query(mysqlcon,globquery, false, "", ""); //Hier ist ein error
format(globquery, sizeof(globquery), "* %s baut eine Parkkralle an das Fahrzeug.", GetName(playerid));
ProxDetector(30.0, playerid, globquery, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
}
}
}
else if(strcmp(x_nr,"Abbauen",true) == 0)
{
for(new vid;vid!=MAX_VEHICLES;vid++)
{
GetVehiclePos(vid,aX,aY,aZ);
if ((floatabs(bX-aX)<3.0)&&(floatabs(bY-aY)<3.0)&&(floatabs(bZ-aZ)<3.0)&&(vid!=GetPlayerVehicleID(playerid)))
{
new theOwner = GetOwner(vid);
new xid;
for(new x;x!=MaxVeh;x++)
{
if(Dtc_PlayerHaveCar[playerid][x])
{
if(vid == PlayerCar[theOwner][x][CarId])
{
xid = x;
break;
}
}
}
PlayerCar[theOwner][xid][Kralle] = 0;
format(globquery,256,"UPDATE `carsystem` SET `Kralle`='0' WHERE `CarOwner`='%s_%d'",GetName(playerid),xid);
mysql_function_query(mysqlcon,globquery, false, "", ""); //hier der andere ERROR
format(globquery, sizeof(globquery), "* %s baut die Parkkralle des Fahrzeugs ab.", GetName(playerid));
ProxDetector(30.0, playerid, globquery, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "============= [Parkkralle] =============");
SendClientMessage(playerid, COLOR_RED, "FEHLER: /parkkralle [name]");
SendClientMessage(playerid, COLOR_GREY, "Verfügbare Namen: Anbauen, Abbauen");
SendClientMessage(playerid, COLOR_WHITE, "============= [Parkkralle] =============");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du gehörst nicht zum Ordnungsamt!");
return 1;
}
return 1;
}