//-------------------------------------------------("Transport Service")-------------------------------------------------
if(strcmp(cmd, "/auspacken", true)==0 && gTeam[playerid] == TEAM_SPEDITION){
if(IsPlayerInAnyVehicle(playerid)){
if(PlayerToPoint(5.0, playerid, -1928.7926,277.4234,41.0469)){
new Float:x,Float:y,Float:z,Float:a,model,vehicleid,color1,color2;
new tmp[256];
new TID = GetVehicleTrailer(GetPlayerVehicleID(playerid));
vehicleid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid,x,y,z);
GetVehicleZAngle(vehicleid,a);
format(string, sizeof(string), "vehicle_%d.sav", TID); // Put the location of the file inside the (" ").
if (dini_Int(string,"eingepackt")==1) {
dini_IntSet(string,"eingepackt",0);
dini_FloatSet(string,"x",x);
dini_FloatSet(string,"y",y);
dini_FloatSet(string,"z",z);
dini_FloatSet(string,"a",a);
tmp = dini_Get(string,"model");
model = strval(tmp);
tmp = dini_Get(string,"x");
x = strval(tmp);
tmp = dini_Get(string,"y");
y = strval(tmp);
tmp = dini_Get(string,"z");
z = strval(tmp);
tmp = dini_Get(string,"a");
a = strval(tmp);
tmp = dini_Get(string,"color1");
color1 = strval(tmp);
tmp = dini_Get(string,"color2");
color2 = strval(tmp);
DestroyVehicle(TID);
SendClientMessage(playerid,COLOR_RED,"Auto ausgepackt!");
CreateVehicle(model,x,y,z,a,color1,color2,300000);
GivePlayerMoney(playerid,500);
}
}
}
return 1;
}
Der Befehl /auspacken funktioniert leider nicht. Woran kann das liegen?