Ghost car and immune car cmd

Started by [VM_U]Spectra.PhantoM^, Feb 13, 2016, 08:11 AM

Previous topic - Next topic

[VM_U]Spectra.PhantoM^

else if (cmd == "gcar")
{
if (!text) MessagePlayer("Syntax: /gcar <on/off>", player);
local veh = player.Vehicle;
switch( text.tolower() )
{
case "on":
veh.IsGhost = true;
MessagePlayer("yay this car is a ghost now!!!!!", player);
break;
case "off":
veh.IsGhost = false;
MessagePlayer("BOO! this car aint a ghost!!!!!", player);
break;
}
}
UNTESTED.
else if (cmd == "immuneveh")
{
if (!text) MessagePlayer("Syntax: /immuneveh <immunityvalue>", player);
local veh = player.Vehicle;
veh.Immunity = text.tointeger();
MessagePlayer("yay this car is immune!!!", player);
}
Untested.
i was bored so i made these if u have any problems like "IT DOES NOT WORK" well i told ya its untested.
Wanna Talk To Me? Come At Irc #Jugo@LUNet

KingOfVC

else if (cmd == "immuneveh")
{
if (!text) MessagePlayer("Syntax: /immuneveh <immunityvalue>", player);
else if ( !player.Vehicle ) MessagePlayer("Get in the fucking car!",player);
else if ( !IsNum(text) ) MessagePlayer("value must be in number babe!",player);
else
{
player.Vehicle.Immunity = text.tointeger();
MessagePlayer("yay this car is immune :3", player);
}
}

DizzasTeR

Let me give you a piece of advice, stop posting things here just because you are 'bored', the rules of this board also include that the snippets posted here must be tested and working. Post something useful which is useful for everyone not just so called newbies.

[VM_U]Spectra.PhantoM^

look mah frnd mah pc crashed thats why i cant test these codes ok as soon as my computer's fixed ill start testing then posting codes.
Wanna Talk To Me? Come At Irc #Jugo@LUNet

KAKAN

Quote from: {ultimatejugo] on Feb 13, 2016, 11:09 AMlook mah frnd mah pc crashed thats why i cant test these codes ok as soon as my computer's fixed ill start testing then posting codes.
Hope your PC never gets fixed.
oh no

RW

If you want to set the car to All Proof you can just use
vehicle.Immunity = 255;
so we can play it