Vice Underdogs
Scripting => Script Showroom => Topic started by: Wezsent on December 14, 2011, 10:32:18 am
-
I gota Share you some of my commands. they are easy. they won't worth any thing
but i wana share them for good
Vehicle Commands for !fix ,!flip and !eject
!fix
if ( cmd == "!fix" )
{
if ( !player.Vehicle ) PrivMessage( "[Error] - You need to be
in a vehicle.", player );
else
{
if ( player.Vehicle.Health == 1000 ) PrivMessage( "[Error] -
This vehicle doesn't need to fix.", player );
else
{
player.Vehicle.Health = 1000;
ClientMessage( "-> Your vehicle has been succesfully fixed.",
player, 984, 252, 777 );
}
}
}
!flip
if ( cmd == "!flip" )
{
if ( !player.Vehicle ) PrivMessage( "[Error] - You need to be
in a vehicle.", player );
else
{
local pos = player.Pos;
local veh = player.Vehicle;
veh.Health = 1000;
veh.Pos = Vector( pos.x+1,pos.y+1.pos.z+1);
ClientMessage( "-> Your vehicle has been succesfully
Fliped.", player, 984, 252, 777 );
}
}
!eject
else if ( cmd == "!eject" )
{
if ( !player.Vehicle ) PrivMessage("*Error : You must be in Vehicle to
get Ejected",player);
else {
local pos = player.Pos;
PrivMessage("You Have Been Ejected From
["+GetVehicleNameFromModel(player.Vehicle.Model)+"]
ID:"+player.Vehicle.ID,player);
player.Pos = Vector( pos.x + 1 , pos.y +2 , pos.z + 3 );
}
}
-
ClientMessage( "-> Your vehicle has been succesfully
Your vehicle has been successfully flipped***
I'm right?
-
ClientMessage( "-> Your vehicle has been succesfully
Your vehicle has been successfully flipped***
I'm right?
It's on the next line. I guess these commands are alright, although I haven't looked over them properly. The one thing I do notice is that they're a big clunky. I'd use more else if () instead of else { if () just purely from an aesthetic point of view.
-
ClientMessage( "-> Your vehicle has been succesfully
Your vehicle has been successfully flipped***
I'm right?
It's on the next line. I guess these commands are alright, although I haven't looked over them properly. The one thing I do notice is that they're a big clunky. I'd use more else if () instead of else { if () just purely from an aesthetic point of view.
heh yeah