if(PCar[playerid][d][P_MID] == 0)
{
PCar[playerid][d][P_ID] = cache_insert_id();
PCar[playerid][d][P_X] = SAHSpawn[SP][0];
PCar[playerid][d][P_Y] = SAHSpawn[SP][1];
PCar[playerid][d][P_Z] = SAHSpawn[SP][2];
PCar[playerid][d][P_R] = SAHSpawn[SP][3];
PCar[playerid][d][P_C1] = FB;
PCar[playerid][d][P_C2] = FB;
PCar[playerid][d][P_MID] = GetVehicleModel(Autohausauto1[i]);
PCar[playerid][d][P_dbID] = pInfo[playerid][db_id];
PCar[playerid][d][P_VID] = CreateVehicle(PCar[playerid][d][P_MID],PCar[playerid][d][P_X] , PCar[playerid][d][P_Y], PCar[playerid][d][P_Z], PCar[playerid][d][P_R], PCar[playerid][d][P_C1], PCar[playerid][d][P_C2], -1);
new query[256];
mysql_format(db, query, sizeof(query), "INSERT INTO personalcars (P_X, P_Y, P_Z, P_R, P_C1, P_C2, P_MID, P_ID, P_VID, P_dbID) VALUES ('%f','%f','%f','%f','%d','%d','%d','%d','%d','%d')",PCar[playerid][d][P_X],PCar[playerid][d][P_Y],PCar[playerid][d][P_Z],PCar[playerid][d][P_R],PCar[playerid][d][P_C1],PCar[playerid][d][P_C2],PCar[playerid][d][P_MID],PCar[playerid][d][P_ID],PCar[playerid][d][P_dbID],PCar[playerid][d][P_VID],PCar[playerid][d][P_dbID]);
mysql_pquery(db,query);
break;
}
Alles anzeigen
Welcher Variable muss jetzt Auto Increatment an haben und primär sein in der Tabelle?
http://prntscr.com/kxj2fk
http://prntscr.com/kxj2ka
ocmd:parken(playerid,params[])
{
new Float:x,Float:y,Float:z,Float:r;
GetPlayerPos(playerid,x,y,z,r);
for(new d = 0; d < sizeof(PCar[]); d++)
{
PCar[playerid][d][P_X] = x;
PCar[playerid][d][P_Y] = y;
PCar[playerid][d][P_Z] = z;
PCar[playerid][d][P_R] = r;
new query[256];
mysql_format(db, query, sizeof(query), "INSERT INTO personalcars (P_X, P_Y, P_Z, P_R) VALUES ('%f','%f','%f','%f')",PCar[playerid][d][P_X],PCar[playerid][d][P_Y],PCar[playerid][d][P_Z],PCar[playerid][d][P_R]);
mysql_pquery(db,query);
break;
}
return 1;
}
Alles anzeigen
Was mache ich hiermit habe mitbekommen ich kriege die "r" nicht raus warum das ?