[Include] [INC] 99.Pawn - Easy Vehicle Functions - "EVF"
#1

Easy Vehicle Functions
Functions:
  • AddPrivateVehicle(Owner[], Model, Float:X, Float:Y, Float:Z, Float:A, Color1, Color2, RespawnDelay);
  • AddRandomVehicle(Float:X, Float:Y, Float:Z, Float:A, RespawnDelay);
  • AddVehicleLine(HowMany, Model, Float:X, Float:FirstY, Float:Z, Float:A, Color1, Color2, RespawnDelay);
  • AddVehicleRow(HowMany, Model, Float:FirstX, Float:Y, Float:Z, Float:A, Color1, Color2, RespawnDelay);
  • ExplodeVehicle(vehicleid, size);
  • LockVehicleForAll(vehicleid, bool:lock);
  • LockVehicleForPlayer(playerid, vehicleid, bool:lock);
  • WarpPlayerToVehicle(playerid, vehicleid);
  • WarpVehicleToPlayer(vehicleid, playerid);
  • LoadEVFVehiclesFromFiles();
  • GetVehicleName(vehicleid);
  • SetVehiclePosEx(vehicleid, Float:X, Float:Y, Float:Z, Float:A);
  • GetVehiclePosEx(vehicleid, &Float:X, &Float:Y, &Float:Z, &Float:A);
  • GetVehicleOwner(vehicleid); (Just working with private vehicles);
  • GetVehicleDriverID(vehicleid);
  • SavePrivateVehicle(Owner[], Model, Float:X, Float:Y, Float:Z, Float:A, Color1, Color2, RespawnDelay);
  • SaveRandomVehicle(Float:X, Float:Y, Float:Z, Float:A, RespawnDelay);
  • SaveVehicleLine(HowMany, Model, Float:X, Float:FirstY, Float:Z, Float:A, Color1, Color2, RespawnDelay);
  • SaveVehicleRow(HowMany, Model, Float:FirstX, Float:Y, Float:Z, Float:A, Color1, Color2, RespawnDelay);
  • SaveNormalVehicle(modelid, Float, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);

Installation:

1. Step: Download the .rar
2. Step: Put the .inc file into "/pawno/includes"
3. Step: Add "#include <pvehicles>" on top of your script.
4. Step: Add the functions to your script
5. Step: .::VERY IMPORTANT::. Add "INC_VehicleSpawn(vehicleid);" to your OnVehicleSpawn callback and "INC_VehicleStateChange(playerid, newstate);" to your OnPlayerStateChange callback.
6. Step: Create one Folder in the scriptfiles which should be called: "EVF".
7. Add my functions to your script.
8. Compile. (If there should be any errors -> ASK HERE FOR SUPPORT
9. Have fun!



Screenshots/Videos:

[99.Pawn]AddPrivateVehicleFunction
[99.Pawn]AddVehicleLine function



Download/Mirrors:

DOWNLOAD

Questions/Feedback/Suggestions/Bugreport:

Feel free to talk about the include here.
Reply
#2

Nice job. Creative and useful.
Reply
#3

lol at the video :P
nice job man
good script
Reply
#4

thank you.
Reply
#5

nice job
Reply
#6

Good work [UvH]thiaZ :P
Reply
#7

Very nice! Definitely going to use this!
Reply
#8

could you show an example of the AddPrivateVehicle as in a proper example - with a test vehicle added. whenever i add one it says Owner[Example] is not defined or w/e
Reply
#9

This is really nice..

With this, could make a really nice and simple vehicle ownership
Reply
#10

Edit: Thanks i'm going to use this

Oldpost: To rude lol cuz i loved these functions
Reply
#11

AddVehicleLine looks cool.
Reply
#12

haha nice work thiaz

--

schцn weiter scripten schatzi
Reply
#13

please help me - when i add this into my script it displayes Owner[] as unknown - please help?
Reply
#14

How do i make it so when i add the owner's name, if the person not the owner's name and they get in it kicks them out.
Reply
#15

little problem with AddPrivateVehicle

i am not sure if i am doing it correct i tried these in my game mode.

AddPrivateVehicle(Owner[iKustomize],522,-1364.7598,-213.3435,13.7183,225.0000,126, 56, 6000);

,

AddPrivateVehicle([iKustomize],522,-1364.7598,-213.3435,13.7183,225.0000,126, 56, 6000);

and

AddPrivateVehicle(iKustomize,522,-1364.7598,-213.3435,13.7183,225.0000,126, 56, 6000);

None of them worked just wondering if you could tell me where i am going wrong.

EDIT-

Also why would we put <pvehicles> as a include when your include file anme is "evf" should it not be #include <evf> ??
Reply
#16

Sorry to bump.

But.. i need a answer for my last post please.
Reply
#17

try

AddPrivateVehicle(playerid,522,-1364.7598,-213.3435,13.7183,225.0000,126, 56, 6000);

or if the player is saved to a file, use the variable for that players name.

Also the include thing, i am not sure of i tried what he said and got a load of errors, but when i used #include <evf> it worked fine.
Reply
#18

Thank you.
Reply
#19

Suggestion: In AddVehicleLine you can use AddStaticVehicleFindZ or something like this. this would be better I think.
Reply
#20

Quote:
Originally Posted by Danny-08
little problem with AddPrivateVehicle

i am not sure if i am doing it correct i tried these in my game mode.

AddPrivateVehicle(Owner[iKustomize],522,-1364.7598,-213.3435,13.7183,225.0000,126, 56, 6000);

,

AddPrivateVehicle([iKustomize],522,-1364.7598,-213.3435,13.7183,225.0000,126, 56, 6000);

and

AddPrivateVehicle(iKustomize,522,-1364.7598,-213.3435,13.7183,225.0000,126, 56, 6000);

None of them worked just wondering if you could tell me where i am going wrong.

EDIT-

Also why would we put <pvehicles> as a include when your include file anme is "evf" should it not be #include <evf> ??
It should be:
AddPrivateVehicle("iKustomize",522,-1364.7598,-213.3435,13.7183,225.0000,126, 56, 6000);

Because player name is a string.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)