Help with (/givecar) command
#1

Hello guys,

Okay i go this:

Код:
CMD:givecar(playerid,params[])
{
    new carid;
    new id;
    new Float:X, Float:Y, Float:Z, Float:angle;
    if(sscanf(params,"du",carid, id)) return SendClientMessage(playerid,-1,"Error: - /givecar [car id] [player id]");
    GetPlayerPos(id, X, Y, Z);
    GetPlayerFacingAngle(id, angle);
    CreateVehicle(carid, X, Y, Z, angle, 0, 1, 60);
    PutPlayerInVehicle(id, carid, 0);
    return 1;
}
But,It does not saving the vehicles (I need something like "personal/private" hope you understand what i mean)

Also,is there anyway to script a command like "/savetunedshit" or something,which will be able to save the tunned data?Or at least,something OnPlayerDisconnect,where it will save the tunned data?

Thank you for reading my thread,and i would appreciate every reply!

Best Regards,
George

((PS: I will not add "+++ REP on my title,because i thinks thats only childish bullshit,furthermore,i will add reputation to every answer even it works or not!))

Reply
#2

I don't care about rep
However about that /savetunedshit.
pasha create a filterscript that saves tuned vehicle.
Download the Ultra Tuned Vehicle. Search it on Filterscript section.
Reply
#3

Dear Romel,

I would really like to thank you for replying to my post!!But,can you please answer to a question?Even i didnt touch the credits,just changed the destination folder,but theres one error,actually i dont have the zDini include,which saves the data,where can i find it?
Reply
#4

There is a way, like always. I'm not going to write the whole script for you because i want you to that yourself, so you can learn how to make things like this. You can use this forum to find some good car ownership filterscript, such as "Advanced vehicle ownership" or something like that. Then you can try to copy these things to your script, maybe modify it a bit to your liking.

You need.

A big enum wich contains all the vehicle data, like vehicle models, colors, tuning, paintjobs, etc.

create_Vehicle function - Creates a vehicle and stores them in a file or mysql.
update_Vehicle function - Will be called when you update your vehicle, so files/mysql is updated too.
load_Vehicle function - So your vehicles will be loaded once you start your server.

There are loads of tutorial on these functions, if you are a beginner, i recommend y_ini.inc file saving include. Use that to save your vehicles and tuning.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)