[Include] Car Ownership
#1

Hi, this is my first Include.

Introduction:
This include allows you to buy and manage your own vehicle.

Procedure:
1. Copy pastebin save as "PCar.inc"
2. The .inc file copy to folder "includes"
3. Now open our GM/FS and paste
#include <PCar>
a) PCar_DialogResponse(playerid,dialogid,response,lis titem); to public OnDialogResponse
b) PCar_PlayerConnect(playerid); to public OnPlayerConnect
c) PCar_PlayerDisconnect(playerid); to public OnPlayerDisconnect
d) PCar_VehicleDeath(vehicleid); to public OnVehicleDeath
e) PCar_OnPlayerCommandText(playerid, cmdtext); to public OnPlayerCommandText
Create folder "PCars" in "scriptfiles" folder

The pastebin is a sample script usage

Another approach can be found in the video!

Commands:
/vehicles - Show list of your vehicles
/park - Park vehicle at its current position

Video: http://www.youtube.com/watch?v=2oLGG...ature=*********

Download: http://pastebin.com/fNTfaZwG

Rate & Comments please

I'm from Czech republic, excuse my English
Reply
#2

Very good!
Reply
#3

Did you think if the ID 123 on dialogs is already used? The value is too low and often its already used on gamemodes.
Reply
#4

Dialog ID 123 I used just to test, feel free to change it
// Video Uploaded
Reply
#5

Okay I edited the script and such, now I finally got it to work.
But /Park, doesn't change the spawnX,Y,Z, & A for the vehicle. It comes back to where I bought it.
Any ideas?
Reply
#6

Change coords:
BuyCarForPlayer(playerid,vehiclemodelid,SpawnX,Spa wnY,SpawnZ,SpawnFacingAngle,Cost);
Reply
#7

Yeah, that's not really what I meant.
I meant, when you type /park, it says that the position is saved.
But when I restart the server, it's back at bought spawn.
Reply
#8

Any help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)