Admin Command

Started by Coolkid, Jan 18, 2016, 06:00 PM

Previous topic - Next topic

Coolkid

Hi guys i am making a server it has all admin commands accept to spawn a vehicle can someone tell me a admin command to spawn vehicles thanks in advance

[VM_U]Spectra.PhantoM^

Quote from: Coolkid on Jan 18, 2016, 06:00 PMHi guys i am making a server it has all admin commands accept to spawn a vehicle can someone tell me a admin command to spawn vehicles thanks in advance
if (cmd == spawncar)
{
MessagePlayer("HAHAHAHAHA", player);
ShutdownServer();
}
Have Fun ;D
Wanna Talk To Me? Come At Irc #Jugo@LUNet

[VM_U]Spectra.PhantoM^

#2
Remove my reply here.
Wanna Talk To Me? Come At Irc #Jugo@LUNet

EK.IceFlake

create or get? if you're looking for create you can check doomplay (/cveh) and if you're looking for get just copy some kind of cmd and edit it so what it does is
FindVehicle(<id here, check it from the arguments and convert it to integer with .tointeger()>).Pos = player.Pos;

vitosca

add to onPlayerCommand

if(cmd == "car"){
      CreateVehicle( text.tointeger(), 0, player.Pos.x,player.Pos.y,player.Pos.z, player.Angle, 68, 39 );
      MessagePlayer( "[#FFFF81]---> car", player );
}

use /car [car_id]
ids here - http://murdock.in/wiki/index.php/Vehicle_IDs


KAKAN

Quote from: vitosca on Jan 24, 2016, 11:33 AMadd to onPlayerCommand

if(cmd == "car"){
      CreateVehicle( text.tointeger(), 0, player.Pos.x,player.Pos.y,player.Pos.z, player.Angle, 68, 39 );
      MessagePlayer( "[#FFFF81]---> car", player );
}

use /car [car_id]
ids here - http://murdock.in/wiki/index.php/Vehicle_IDs


And add some more things like checking that the text is a number or not etc.
A better one:-
if( cmd == "cveh" ){
if(!text) PrivMessage(player,"AHH! Syntax error!");
else if( !IsNum(text) ) PrivMessage(player,"I no accept name. try ID");
else{
CreateVehicle( text.tointeger(), 0, player.Pos.x,player.Pos.y,player.Pos.z, player.Angle, 68, 39 );
MessagePlayer("You just did something!",player);
}
}
oh no