[Commands] Some Command For Cars

Mohamed

  • Full Member
  • Regards, We3da
  • Posts: 247
[Commands] Some Command For Cars
«  »Last edited
Hello, For That Topic i Want Just To Help The Newbie,
Here's Command:-/lockcar <ID> - /unlockcar <ID> - /alarmon <ID> - /alarmoff <ID> - /lighton <ID> - /lightoff <ID>
Command:-Alarm
Code: [Select]
else if ( cmd == "alarmoff" )
{
if ( !player.IsSpawned ) MessagePlayer("[#ff0000][INFO][#ffffff] You need be spawned to use this command.", player );
else if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /alarmoff <Veh/id>", player );
else if ( !IsNum( text ) ) MessagePlayer( "[#ff0000][INFO][#ffffff] Vehicle/ID Must Be Numbers.", player );
else {
local veh = FindVehicle( text.tointeger() );
if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /alarmon <Veh/id>", player );
else if ( !veh ) MessagePlayer( "[#ff0000][ERROR][#ffffff] Invalid Vehicle/ID.", player );
else {
MessagePlayer( "[#00ffff][INFO][#ffffff] Done You Are Disabled Alarm [ " + GetVehicleNameFromModel( veh.Model ) + " ]." , player )
veh.Alarm = false;
}
}
return 0;
}
else if ( cmd == "alarmon" )
{
if ( !player.IsSpawned ) MessagePlayer("[#ff0000][INFO][#ffffff] You need be spawned to use this command.", player );
else if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /alarmon <Veh/id>", player );
else if ( !IsNum( text ) ) MessagePlayer( "[#ff0000][INFO][#ffffff] Vehicle/ID Must Be Numbers.", player );
else {
local veh = FindVehicle( text.tointeger() );
if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /alarmon <Veh/id>", player );
else if ( !veh ) MessagePlayer( "[#ff0000][ERROR][#ffffff] Invalid Vehicle/ID.", player );
else {
MessagePlayer( "[#00ffff][INFO][#ffffff] Done You Are Enabled Alarm [ " + GetVehicleNameFromModel( veh.Model ) + " ]." , player )
veh.Alarm = true;
}
}
return 0;
}
Command:-Lock-Unlock
Code: [Select]
else if ( cmd == "unlockcar" )
{
if ( !player.IsSpawned ) MessagePlayer("[#ff0000][INFO][#ffffff] You need be spawned to use this command.", player );
else if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /unlockcar <Veh/id>", player );
else if ( !IsNum( text ) ) MessagePlayer( "[#ff0000][INFO][#ffffff] Vehicle/ID Must Be Numbers.", player );
else {
local veh = FindVehicle( text.tointeger() );
if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /unlockcar <Veh/id>", player );
else if ( !veh ) MessagePlayer( "[#ff0000][ERROR][#ffffff] Invalid Vehicle/ID.", player );
else {
MessagePlayer( "[#00ffff][INFO][#ffffff] Done You Are Unlocked Car [ " + GetVehicleNameFromModel( veh.Model ) + " ]." , player )
veh.Locked = false;
}
}
return 0;
}
else if ( cmd == "lockcar" )
{
if ( !player.IsSpawned ) MessagePlayer("[#ff0000][INFO][#ffffff] You need be spawned to use this command.", player );
else if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /lockcar <Veh/id>", player );
else if ( !IsNum( text ) ) MessagePlayer( "[#ff0000][INFO][#ffffff] Vehicle/ID Must Be Numbers.", player );
else {
local veh = FindVehicle( text.tointeger() );
if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /lockcar <Veh/id>", player );
else if ( !veh ) MessagePlayer( "[#ff0000][ERROR][#ffffff] Invalid Vehicle/ID.", player );
else {
MessagePlayer( "[#00ffff][INFO][#ffffff] Done You Are Locked Car [ " + GetVehicleNameFromModel( veh.Model ) + " ]." , player )
veh.Locked = true;
}
}
return 0;
}
Command:-Lights
Code: [Select]
else if ( cmd == "lighton" )
{
if ( !player.IsSpawned ) MessagePlayer("[#ff0000][INFO][#ffffff] You need be spawned to use this command.", player );
else if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /lighton <Veh/id>", player );
else if ( !IsNum( text ) ) MessagePlayer( "[#ff0000][INFO][#ffffff] Vehicle/ID Must Be Numbers.", player );
else {
local veh = FindVehicle( text.tointeger() );
if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /lighton <Veh/id>", player );
else if ( !veh ) MessagePlayer( "[#ff0000][ERROR][#ffffff] Invalid Vehicle/ID.", player );
else {
MessagePlayer( "[#00ffff][INFO][#ffffff] Done You Are Enabled Lights [ " + GetVehicleNameFromModel( veh.Model ) + " ]." , player )
veh.Lights = true;
}
}
return 0;
}
else if ( cmd == "lightoff" )
{
if ( !player.IsSpawned ) MessagePlayer("[#ff0000][INFO][#ffffff] You need be spawned to use this command.", player );
else if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /lightoff <Veh/id>", player );
else if ( !IsNum( text ) ) MessagePlayer( "[#ff0000][INFO][#ffffff] Vehicle/ID Must Be Numbers.", player );
else {
local veh = FindVehicle( text.tointeger() );
if ( !text ) MessagePlayer( "[#00ffff][INFO][#ffffff] /lightoff <Veh/id>", player );
else if ( !veh ) MessagePlayer( "[#ff0000][ERROR][#ffffff] Invalid Vehicle/ID.", player );
else {
MessagePlayer( "[#00ffff][INFO][#ffffff] Done You Are Disabled Lights [ " + GetVehicleNameFromModel( veh.Model ) + " ]." , player )
veh.Lights = false;
}
}
return 0;
}
Hope iTs Help :P


Feel Free To PM Me For Any Support, I'm Care.
Anyway u can Contact Me Ingame!
Ingame Name: [AFt]We3da^
My Own Server: ViceEvil Server

=RK=MarineForce

  • Sr. Member
  • WAR IS HELL!
  • Posts: 447
Try to UnderStand ME!

Mohamed

  • Full Member
  • Regards, We3da
  • Posts: 247
Feel Free To PM Me For Any Support, I'm Care.
Anyway u can Contact Me Ingame!
Ingame Name: [AFt]We3da^
My Own Server: ViceEvil Server

Bninin...

  • Newbie
  • Posts: 12
[Commands] Re: Some Command For Cars
« Reply #3,  »
mohamed plz tell me how to download ?

Humzasajjad

  • Newbie
  • Posts: 23

Derwaish.

  • Jr. Member
  • Loading.....
  • Posts: 76
[Commands] Re: Some Command For Cars
« Reply #5,  »
For god sake please stop copying and spamming.

umar4911

  • Sr. Member
  • Creating own server!
  • Posts: 473
[Commands] Re: Some Command For Cars
« Reply #6,  »
Quote from Humzasajjad on September 2nd, 2018, 12:10 AM
Where to paste these scripts?
these are commands so you need to paste these inside the function onPlayerCommand

Since you are newbie, visit wiki for more info
I am gamer, programmer and hacker. Try to find me!
xD