Hey Will This Work???
#6

I noticed you are using "GetPlayerVehicleID" as Model.
You should look the functions that you use up in the wiki. GetPlayerVehicleID, will give you the ID and not the model. Try for example like this: "GetVehicleModel(GetPlayerVehicleID(playerid)) "

Now about your SaveCarInfo function. How about you change your parameters?
Instead of SaveCarInfo(playerid), you could use SaveCarInfo(playerid, vehicleid). Then it would look something like this:

pawn Код:
forward SaveCarInfo(playerid, vehicleid);
public SaveCarInfo(playerid, vehicleid)
{
    new vfile[256], string[256];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(vfile, sizeof(vfile), ARS_VEH, name); //Are you sure this is right?
    new Float:X, Float:Y, Float:Z, Float:A;
    GetVehiclePos(vehicleid, X, Y, Z);
    GetVehicleZAngle(vehicleid, A);
    dini_IntSet(vfile, "Model", GetVehicleModel(vehicleid));
    dini_Set(vfile, "Plate", PlayerInfo[playerid][pFirstname] );
    dini_FloatSet(vfile, "LocX", X);
    dini_FloatSet(vfile, "LocY", Y);
    dini_FloatSet(vfile, "LocZ", Z);
    dini_FloatSet(vfile, "LocA", A);
    dini_IntSet(vfile, "Color1",VehicleInfo[playerid][vColor1]);
    format(string, sizeof(string), "Car Saved At %f, %f, %f, %f", X, Y, Z, A);
    SendClientMessage(playerid, GREEN, string);
    return 1;
}
Try going from there. Play around with it and look up functions in the wiki.
Reply


Messages In This Thread
Hey Will This Work??? - by Buzzbomb - 14.10.2011, 00:43
Re: Hey Will This Work??? - by Buzzbomb - 14.10.2011, 02:34
Re: Hey Will This Work??? - by DaRkAnGeL[NBK] - 14.10.2011, 03:41
Re: Hey Will This Work??? - by Buzzbomb - 14.10.2011, 03:55
Re: Hey Will This Work??? - by Buzzbomb - 14.10.2011, 06:25
Re: Hey Will This Work??? - by Germanator - 14.10.2011, 07:09

Forum Jump:


Users browsing this thread: 4 Guest(s)