Wieso Speichert er die Dateien nicht in die verzeichnisse
Hallo, ich wollte machen das er die Verschiedenen Fahrzeugarten in verschiedene Verzeichnisse erstellt, damit man sich von jeder klasse 1 Fahrzeug kaufen kann.
Blos wenn ich mir jetzt ein Fahrzeug kaufe dann klappt dies nicht. Es erstellt sich kein Fahrzeug mehr und keine datei mehr. Die Verzeichnisse sind alle erhalten.
Hier mal was ich geschrieben habe:
createPlayerCar(playerid,modelid,Float:x,Float:y,Float:z,Float:r)
{
//if(GetVehicleModel(modelid) == 411)
if(GetVehicleModel(modelid) == 461 || GetVehicleModel(modelid) == 462 ||
GetVehicleModel(modelid) == 471 || GetVehicleModel(modelid) == 481 || GetVehicleModel(modelid) == 509 || GetVehicleModel(modelid) == 510 ||
GetVehicleModel(modelid) == 521 || GetVehicleModel(modelid) == 522 || GetVehicleModel(modelid) == 581 || GetVehicleModel(modelid) == 586)
{
new Autodatei[64];
new name[MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z,Float:R;
new vID = GetPlayerVehicleID(playerid);
GetVehiclePos(vID, X, Y, Z);
GetVehicleZAngle(vID,R);
GetPlayerName(playerid,name,sizeof(name));
format(Autodatei,sizeof(Autodatei),"/Autos/Motorräder/%s./txt",name);
dini_Create(Autodatei);
dini_Set(Autodatei,"Besitzer",name);
dini_IntSet(Autodatei,"Modelid",modelid);
dini_FloatSet(Autodatei, "X", x);
dini_FloatSet(Autodatei, "Y", y);
dini_FloatSet(Autodatei, "Z", z);
dini_FloatSet(Autodatei, "R", r);
CreateVehicle(modelid,X,Y,Z,R,-1,-1,-1);
}
if(GetVehicleModel(modelid) == 460 || GetVehicleModel(modelid) == 551 || GetVehicleModel(modelid) == 512 ||
GetVehicleModel(modelid) == 513 || GetVehicleModel(modelid) == 519 || GetVehicleModel(modelid) == 577 ||
GetVehicleModel(modelid) == 593)
{
new Autodatei[64];
new name[MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z,Float:R;
new vID = GetPlayerVehicleID(playerid);
GetVehiclePos(vID, X, Y, Z);
GetVehicleZAngle(vID,R);
GetPlayerName(playerid,name,sizeof(name));
format(Autodatei,sizeof(Autodatei),"/Autos/Flugzeuge/%s.txt",name);
dini_Create(Autodatei);
dini_Set(Autodatei,"Besitzer",name);
dini_IntSet(Autodatei,"Modelid",modelid);
dini_FloatSet(Autodatei, "X", x);
dini_FloatSet(Autodatei, "Y", y);
dini_FloatSet(Autodatei, "Z", z);
dini_FloatSet(Autodatei, "R", r);
CreateVehicle(modelid,X,Y,Z,R,-1,-1,-1);
}
if(GetVehicleModel(modelid) == 446 || GetVehicleModel(modelid) == 452 || GetVehicleModel(modelid) == 453 || GetVehicleModel(modelid) == 454 ||
GetVehicleModel(modelid) == 472 || GetVehicleModel(modelid) == 473 || GetVehicleModel(modelid) == 484 || GetVehicleModel(modelid) == 493)
{
new Autodatei[64];
new name[MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z,Float:R;
new vID = GetPlayerVehicleID(playerid);
GetVehiclePos(vID, X, Y, Z);
GetVehicleZAngle(vID,R);
GetPlayerName(playerid,name,sizeof(name));
format(Autodatei,sizeof(Autodatei),"/Autos/Boote/%s.txt",name);
dini_Create(Autodatei);
dini_Set(Autodatei,"Besitzer",name);
dini_IntSet(Autodatei,"Modelid",modelid);
dini_FloatSet(Autodatei, "X", x);
dini_FloatSet(Autodatei, "Y", y);
dini_FloatSet(Autodatei, "Z", z);
dini_FloatSet(Autodatei, "R", r);
CreateVehicle(modelid,X,Y,Z,R,-1,-1,-1);
}
if(GetVehicleModel(modelid) == 400 || GetVehicleModel(modelid) == 401 || GetVehicleModel(modelid) == 402 || GetVehicleModel(modelid) == 404 || GetVehicleModel(modelid) == 405 ||
GetVehicleModel(modelid) == 409 || GetVehicleModel(modelid) == 410 || GetVehicleModel(modelid) == 411 || GetVehicleModel(modelid) == 412 ||
GetVehicleModel(modelid) == 415 || GetVehicleModel(modelid) == 418 || GetVehicleModel(modelid) == 419 || GetVehicleModel(modelid) == 421 ||
GetVehicleModel(modelid) == 422 || GetVehicleModel(modelid) == 424 || GetVehicleModel(modelid) == 426 || GetVehicleModel(modelid) == 429 ||
GetVehicleModel(modelid) == 434 || GetVehicleModel(modelid) == 436 || GetVehicleModel(modelid) == 439 || GetVehicleModel(modelid) == 445 ||
GetVehicleModel(modelid) == 451 || GetVehicleModel(modelid) == 457 || GetVehicleModel(modelid) == 458 || GetVehicleModel(modelid) == 466 ||
GetVehicleModel(modelid) == 467 || GetVehicleModel(modelid) == 474 || GetVehicleModel(modelid) == 457 || GetVehicleModel(modelid) == 477 ||
GetVehicleModel(modelid) == 478 || GetVehicleModel(modelid) == 479 || GetVehicleModel(modelid) == 480 || GetVehicleModel(modelid) == 483 ||
GetVehicleModel(modelid) == 489 || GetVehicleModel(modelid) == 491 || GetVehicleModel(modelid) == 492 || GetVehicleModel(modelid) == 494 ||
GetVehicleModel(modelid) == 495 || GetVehicleModel(modelid) == 500 || GetVehicleModel(modelid) == 502 || GetVehicleModel(modelid) == 503 ||
GetVehicleModel(modelid) == 506 || GetVehicleModel(modelid) == 507 || GetVehicleModel(modelid) == 516 || GetVehicleModel(modelid) == 517 ||
GetVehicleModel(modelid) == 518 || GetVehicleModel(modelid) == 526 || GetVehicleModel(modelid) == 527 || GetVehicleModel(modelid) == 529 ||
GetVehicleModel(modelid) == 533 || GetVehicleModel(modelid) == 534 || GetVehicleModel(modelid) == 535 || GetVehicleModel(modelid) == 536 ||
GetVehicleModel(modelid) == 540 || GetVehicleModel(modelid) == 541 || GetVehicleModel(modelid) == 542 || GetVehicleModel(modelid) == 543 ||
GetVehicleModel(modelid) == 545 || GetVehicleModel(modelid) == 546 || GetVehicleModel(modelid) == 547 || GetVehicleModel(modelid) == 549 ||
GetVehicleModel(modelid) == 550 || GetVehicleModel(modelid) == 551 || GetVehicleModel(modelid) == 554 || GetVehicleModel(modelid) == 555 ||
GetVehicleModel(modelid) == 558 || GetVehicleModel(modelid) == 559 || GetVehicleModel(modelid) == 560 || GetVehicleModel(modelid) == 561 ||
GetVehicleModel(modelid) == 562 || GetVehicleModel(modelid) == 565 || GetVehicleModel(modelid) == 566 || GetVehicleModel(modelid) == 567 ||
GetVehicleModel(modelid) == 568 || GetVehicleModel(modelid) == 571 || GetVehicleModel(modelid) == 575 || GetVehicleModel(modelid) == 576 ||
GetVehicleModel(modelid) == 580 || GetVehicleModel(modelid) == 585 || GetVehicleModel(modelid) == 587 || GetVehicleModel(modelid) == 589 ||
GetVehicleModel(modelid) == 602 || GetVehicleModel(modelid) == 603 || GetVehicleModel(modelid) == 604 || GetVehicleModel(modelid) == 605)
{
new Autodatei[64];
new name[MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z,Float:R;
new vID = GetPlayerVehicleID(playerid);
GetVehiclePos(vID, X, Y, Z);
GetVehicleZAngle(vID,R);
GetPlayerName(playerid,name,sizeof(name));
format(Autodatei,sizeof(Autodatei),"/Autos/Fahrzeuge/%s.txt",name);
dini_Create(Autodatei);
dini_Set(Autodatei,"Besitzer",name);
dini_IntSet(Autodatei,"Modelid",modelid);
dini_FloatSet(Autodatei, "X", x);
dini_FloatSet(Autodatei, "Y", y);
dini_FloatSet(Autodatei, "Z", z);
dini_FloatSet(Autodatei, "R", r);
CreateVehicle(modelid,X,Y,Z,R,-1,-1,-1);
}
Danke im vorraus
MfG Exon
P.S: Es gibt auch die Pastebin Version : http://pastebin.com/FPwxvKJg