Könntest du mir dabei helfen via TV oderso hamachi?
sonnige grüsse..
ich könnte dir über TV helfen einfach PN an mich ![]()
Könntest du mir dabei helfen via TV oderso hamachi?
sonnige grüsse..
ich könnte dir über TV helfen einfach PN an mich ![]()
Nur ein Platz im Projekt und spaß im team
Was möchtest du denn für ein Projekt? Reallife/Roleplay/DM ? Mfg Basti
Reallife/Roleplay
Kreis Altenkirchen
Guten Tag zusammen,
Ich heiße Fabian K. bin 19 Jahre alt und komme aus Rheinland-Pfalz zu meinen Hobbys gehört mit Freunden Treffen und Programmieren.
Ich Scripter seid ca. 5 Jahren und suche zurzeit ein Projekt wo ich mitwirken kann.
Das Team sollte mindestens 17+ sein und eine gewisse reife besitzen.
Bei Intresse einfach melden.
ps. Ich weiß diese such anfrage ist kurz also seid nicht so streng. ![]()
#Push 18Uhr
http://www.lmdfdg.com/?q=Samp+Mysql+R37+Linux+download
und hier der link hat mich nur 30 sekunden meiner zeit gekostet ![]()
Ich würde dir die R40 empfehlen
entwerde
mysql_pquery
oder
mysql_tquery
Versuch es ma so zumachen:
new query[258];
format(query, sizeof(query), "INSERT INTO `users` (`name`, `password`,`Hauskey`,`Wohnungkey`) VALUES ('%e', '%e','501','501')", GetName(playerid), password);
Steht was im Mysql log?
und wo hast du es den grade stehen?
Ich habs bis jetz so:
[b]public[/b] OnQueryFinish(ThreadID, ExtraID) {
[b]new[/b] rows;
cache_get_row_count(rows);
[b]switch[/b](ThreadID) {
[b]case[/b] _SQL_LoadAllCars: {
[b]if[/b](rows != 0) {
[b]new[/b] lastid = 0,
idx = 0;
[b]while[/b](idx < rows) {
}
}
}
}
[b]return[/b] 1;
}
will es so ungefähr machen:
[b]public[/b] Dtdc_LoadAllCars(bool:spawn)
{
format(sql,sizeof(sql),"SELECT `Owner`, `SlotId` FROM `playercars` ORDER BY `id`");
mysql_query_fix(sql);
mysql_store_result();
[b]new[/b] strFromFile2[200];
[b]new[/b] rows = mysql_num_rows();
[b]if[/b](rows != 0)
{
[b]#if[/b] [b]defined[/b] MYSQL_StrickenKid
[b]new[/b] arrCoords[2][40];
[b]while[/b] (mysql_fetch_row2(strFromFile2,","))
{
Dtdc_split(strFromFile2, arrCoords, ',');
[b]new[/b] slot = strval(arrCoords[1]);
[b]new[/b] Name[40];
strmid(Name, arrCoords[0], 0, strlen(arrCoords[0]), 40);
[b]new[/b] id = Dtdc_LoadVeh(Name,slot);
[b]if[/b](id != -1 && spawn == true) {SetTimerEx("Dtdc_SpawnVeh",1000,0,"d",id);}
}
mysql_free_result();
[b]#else[/b]
[b]new[/b] arrCoords[3][40];
[b]new[/b] lastid = 0;
[b]new[/b] idx = 0;
[b]while[/b] (idx < rows)
{
mysql_free_result();
format(sql,sizeof(sql),"SELECT `Owner`, `SlotId`, `id` FROM `playercars` WHERE `id` > '%d' ORDER BY `id` LIMIT 1",lastid);
mysql_query_fix(sql);
mysql_store_result();
mysql_fetch_row2(strFromFile2,",");
Dtdc_split(strFromFile2, arrCoords, ',');
[b]new[/b] slot = strval(arrCoords[1]);
lastid = strval(arrCoords[2]);
[b]new[/b] Name[40];
strmid(Name, arrCoords[0], 0, strlen(arrCoords[0]), 40);
[b]new[/b] id = Dtdc_LoadVeh(Name,slot);
[b]if[/b](id != -1 && spawn == true) {SetTimerEx("Dtdc_SpawnVeh",1000,0,"d",id);}
idx++;
}
[b]#endif[/b]
}
}
Gibt es eine Möglichkeit bei MySQL R40 für mysql_store_result ?
Nice hoster server sind schnell verfügbar ![]()
Schönes Script schade es es nur in DINI geschrieben wurde. Bekommst von mir 9/10 für die Arbeit
@Aeac das umschreiben auf mysql ist easy.
Nice Skript
10/10
Very nice falls du noch ein Projekt suchen solltest melde dich mal bei mir per skype oder per PN. würde mich sehr freuen;)
skype: nexsa23
Setze ich das idx ich hier auf 1 :
stock OnLoadAllCars() {new Cache:Temp = mysql_query(handle,"SELECT `Owner`, `SlotId` FROM `playervehicles` ORDER BY `ID`"),rows = cache_get_row_count(handle);if(rows != 0){new idx = 1, Name[40], slotid;while (idx < rows) {cache_get_field_content(idx, "Owner", Name, handle, MAX_PLAYER_NAME);slotid = cache_get_field_content_int(idx, "SlotId", handle);LoadPlayerVehicle(Name, slotid);idx++;}}return cache_delete(Temp);}
wird das zweite Fahrzeug geladen 0o
EDIT
Habs jetz so gemacht:
public OnQueryFinish(Threadid, extraid) {
switch(Threadid){
case Thread_OnLoadPlayerVehicles: {
new id, idx= 0,
rows = cache_get_row_count(handle);
while (idx < rows) {
id = GetFreeCarID();
pVInfo[id][pV_SQLid] = cache_get_field_content_int(idx, "ID", handle);
cache_get_field_content(idx, "Owner", pVInfo[id][pV_Owner], handle, MAX_PLAYER_NAME);
pVInfo[id][pV_SlotID] = cache_get_field_content_int(idx, "SlotId", handle);
pVInfo[id][pV_ModelID] = cache_get_field_content_int(idx, "ModelID", handle);
pVInfo[id][pV_Pos][0] = cache_get_field_content_float(idx, "X", handle);
pVInfo[id][pV_Pos][1] = cache_get_field_content_float(idx, "Y", handle);
pVInfo[id][pV_Pos][2] = cache_get_field_content_float(idx, "Z", handle);
pVInfo[id][pV_Pos][3] = cache_get_field_content_float(idx, "A", handle);
pVInfo[id][pV_Color][0] = cache_get_field_content_int(idx, "Color1", handle);
pVInfo[id][pV_Color][1] = cache_get_field_content_int(idx, "Color2", handle);
pVInfo[id][pV_CarID] = CreateVehicle(pVInfo[id][pV_ModelID], pVInfo[id][pV_Pos][0], pVInfo[id][pV_Pos][1], pVInfo[id][pV_Pos][2], pVInfo[id][pV_Pos][3], pVInfo[id][pV_Color][0], pVInfo[id][pV_Color][1], -1);
printf("VehID: %i | Owner: %s | SlotID: %i", pVInfo[id][pV_CarID], pVInfo[id][pV_Owner], pVInfo[id][pV_SlotID]);
idx++;
}
return 1;
}
}
return 1;
}
Guten Morgen,
Beim laden des Fahrzeuges wird nur das erste fahrzeug in der Datenbank geladen und ich kann den fehler nicht finden.
Hier mein Code:
stock OnLoadAllCars() {
new Cache:Temp = mysql_query(handle,"SELECT `Owner`, `SlotId` FROM `playervehicles` ORDER BY `ID`");
if(cache_get_row_count(handle) != 0)
{
new idx = 0, lastid = 0, sql[258];
format(sql,sizeof(sql),"SELECT `Owner`, `SlotId`, `ID` FROM `playervehicles` WHERE `ID` > '%d' ORDER BY `ID` LIMIT 1",lastid);
new Cache:Temp1 = mysql_query(handle, sql);
new rows = cache_get_row_count(handle);
while (idx < rows) {
new Name[40];
cache_get_field_content(idx, "Owner", Name, handle, MAX_PLAYER_NAME);
new slotid = cache_get_field_content_int(idx, "SlotId", handle);
lastid = cache_get_field_content_int(idx, "ID", handle);
LoadPlayerVehicle(Name, slotid);
idx++;
}
cache_delete(Temp1);
}
cache_delete(Temp);
}
stock LoadPlayerVehicle(PlayerName[], Slot) {
printf("Owner: %s | Slot: %i", PlayerName,Slot);
new sql[258];
format(sql,sizeof(sql),"SELECT * FROM `playervehicles` WHERE `Owner` = '%s' AND `SlotId` = '%d' ORDER BY `ID` DESC LIMIT 1",PlayerName,Slot);
new Cache:Temp = mysql_query(handle,sql),
rows = cache_get_row_count(handle),
id, idx = 0;
while (idx < rows) {
for(new i= 0; i < MAX_VEHICLES; i++) {
if(pVInfo[i][pV_CarID] < 1) {
id = i;
break;
}
}
pVInfo[idx][pV_SQLid] = cache_get_field_content_int(idx, "ID", handle);
cache_get_field_content(idx, "Owner", pVInfo[id][pV_Owner], handle, MAX_PLAYER_NAME);
pVInfo[id][pV_SlotID] = cache_get_field_content_int(idx, "SlotId", handle);
pVInfo[id][pV_ModelID] = cache_get_field_content_int(idx, "ModelID", handle);
pVInfo[id][pV_Pos][0] = cache_get_field_content_float(idx, "X", handle);
pVInfo[id][pV_Pos][1] = cache_get_field_content_float(idx, "Y", handle);
pVInfo[id][pV_Pos][2] = cache_get_field_content_float(idx, "Z", handle);
pVInfo[id][pV_Pos][3] = cache_get_field_content_float(idx, "A", handle);
pVInfo[id][pV_Color][0] = cache_get_field_content_int(idx, "Color1", handle);
pVInfo[id][pV_Color][1] = cache_get_field_content_int(idx, "Color2", handle);
pVInfo[id][pV_CarID] = CreateVehicle(pVInfo[id][pV_ModelID], pVInfo[id][pV_Pos][0], pVInfo[id][pV_Pos][1], pVInfo[id][pV_Pos][2], pVInfo[id][pV_Pos][3], pVInfo[id][pV_Color][0], pVInfo[id][pV_Color][1], -1);
printf("VehID: %i | Owner: %s | SlotID: %i", pVInfo[id][pV_CarID], pVInfo[id][pV_Owner], pVInfo[id][pV_SlotID]);
idx++;
}
cache_delete(Temp);
return 1;
}
Bitte um hilfe.
Rheinland - Pfalz Alsdorf ![]()