[FilterScript] Vehicle Control System [First Release]
#1

Hey guys. This is my first FilterScript release. It's just a very easy and simple Vehicle Control System. I released it because I've never released anything before, and I coded this myself for my Roleplay Server. This is very useful for Roleplay Servers, please don't tell me there's heaps of these because I know there is, I just felt like releasing it to the public! Please enjoy

Version 1.5
How to install:
1. Download it from: http://www.solidfiles.com/d/12761/
2. Extract "vehiclecontrol.pwn" into your FilterScripts folder
3. Open "vehiclecontrol.pwn" in Pawn
4. Run and Compile it
5. Open your "server.cfg" file
6. Under filterscripts, add "vehiclecontrol"
7. Save server.cfg, and run your server.

Includes needed:
Код:
#include <a_samp>
#include <zcmd>
Info:
Код:
Engine:
Uses one command, "/engine". Player needs to be in a car. It sends an Roleplay message with ProxDetector to other players within a radius of 20.0

Lights:
Uses one command, "/lights". Player needs to be in a car. It sends an Roleplay message with ProxDetector to other players within a radius of 20.0

Hood:
Uses one command, "/hood". It sends an Roleplay message with ProxDetector to other players within a radius of 20.0

Trunk:
Uses one command, "/trunk". It sends an Roleplay message with ProxDetector to other players within a radius of 20.0

Lock:
Uses one command, "/lockv". Player needs to be in a car or in range of their last vehicle. It sends an Roleplay message with ProxDetector to other players within a radius of 20.0. It is commented in this version as I don't use it in my server, just remove the "/*" at the start of CMD:lockv and remove the "*/" at the end!

Objective:
Uses the command "/objective" and sets the cars objective point to "ON" or "OFF".
Number plates:
Add this code at the bottom of the FilterScript:
pawn Код:
CMD:plate(playerid, params[])
{
new string[258];
if(!strlen(params)) return SendClientMessage(playerid, -1, "/plate [A-Z, 0-9]");
new oldcar = gLastCar[playerid];
new Float:cX, Float:cY, Float:cZ;
GetVehiclePos(oldcar, cX, cY, cZ);
new vehicleid = GetPlayerVehicleID(playerid);
if(IsAPlane(vehicleid) || IsAHelicopter(vehicleid) || IsABike(vehicleid) || IsATrain(vehicleid) || IsABoat(vehicleid)) return SendClientMessage(playerid, -1, "You can only set plates for Cars!");
if(!IsPlayerDriver(playerid)) return SendClientMessage(playerid, -1, "You are not in a Car to set the plate!");
SetVehicleNumberPlate(oldcar, params);
SetVehicleToRespawn(oldcar);
format(string, sizeof(string), "You set your Vehicle's Plate to %s", params);
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid, -1, "It has also respawned at its original spot!");
return 1;
}
Changelog:
Код:
** Added /lockv, you can lock your car from the inside/outside, it locks your last used car
** You can now only do /hood and /engine in a vehicle WITH A HOOD/TRUNK
** You can now do /trunk and /hood from OUTSIDE the car
** Added /objective, needs uncommenting if you want to use it
Bugs:
A bicycle has a "engine"

Version 2: soon to be released.
** Store your items temporaily in the vehicle!

Current Version: 1.5
http://pastebin.com/32zBxknN

Previous Version:
1.0

http://www.solidfiles.com/d/91467/
Reply
#2

Nice work dude
Reply
#3

Loook Nice
But Add /lock /unlock
Reply
#4

Thanks for the feedback.

** Added /lockv
Reply
#5

Nice, I Will Use This
Reply
#6

Quote:
Originally Posted by Drza
Посмотреть сообщение
Nice, I Will Use This
Good to hear . If anyone doesn't know how to integrate the lock system with their car system just PM me and I'll do it for you.
Reply
#7

I thought of :
pawn Код:
if(!IsPlayerDriver(playerid))
{
    SendClientMessage(playerid,red,"[Vehicle Control] You're not in range of a Vehicle with a hood!");
    return 1;
}
Will check the closest car and check if the vehicle have a hood, but it's not....

Also, I can open the hood of NRG-500 ? ( lol )

Anyways, nice for your 1st try!
Reply
#8

Quote:
Originally Posted by Basicz
Посмотреть сообщение
I thought of :
pawn Код:
if(!IsPlayerDriver(playerid))
{
    SendClientMessage(playerid,red,"[Vehicle Control] You're not in range of a Vehicle with a hood!");
    return 1;
}
Will check the closest car and check if the vehicle have a hood, but it's not....

Also, I can open the hood of NRG-500 ? ( lol )

Anyways, nice for your 1st try!
Yeah, that's what I'm working on at the moment (have a server to maintain at the same time)

And thanks for that report - didn't notice. Will update it asap!
Reply
#9

why i get these errors?

C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(134) : error 017: undefined symbol "ManualVehicleEngineAndLights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(159) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(170) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(179) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "boot"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "bonnet"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "doors"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "lights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(195) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(206) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(215) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "boot"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "bonnet"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "doors"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "engine"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(231) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(242) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(251) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "boot"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "doors"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "lights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "engine"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(267) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(27 : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(287) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "bonnet"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "doors"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "lights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "engine"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(306) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(317) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(326) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "boot"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "bonnet"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "lights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "engine"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


16 Errors.




And how can i change commands for example: /engine to /variklis?
Reply
#10

Quote:
Originally Posted by soulas85
Посмотреть сообщение
why i get these errors?

C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(134) : error 017: undefined symbol "ManualVehicleEngineAndLights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(159) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(170) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(179) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "boot"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "bonnet"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "doors"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(15 : warning 203: symbol is never used: "lights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(195) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(206) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(215) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "boot"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "bonnet"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "doors"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(194) : warning 203: symbol is never used: "engine"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(231) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(242) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(251) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "boot"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "doors"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "lights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(230) : warning 203: symbol is never used: "engine"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(267) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(27 : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(287) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "bonnet"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "doors"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "lights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(266) : warning 203: symbol is never used: "engine"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(306) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(317) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(326) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "objective"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "boot"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "bonnet"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "alarm"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "lights"
C:\Users\Slashas94\Desktop\RP-GRP\filterscripts\vehiclecontrol.pwn(305) : warning 203: symbol is never used: "engine"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


16 Errors.




And how can i change commands for example: /engine to /variklis?
Put this ontop of your script:
Код:
#include <a_vehicles>
To change the engine command, change:
Код:
CMD:engine(playerid, params[])
To:
Код:
CMD:yourcommand(playerid, params[])
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)