Author Topic: How do i make a command to go like quake player?  (Read 863 times)

I Wanna script a command that makes you go like quake player
« Last Edit: January 25, 2017, 12:23:16 PM by FlySky »

All server commands (that you type like: /clearbricks) are prefixed with ServerCmd. So if you want a command to be called /beQuake then the code will look like:

function serverCmdBeQuake(%client)
{
   //define the player object
   %player = %client.player;
   
   //check if the player exists
   if(isObject(%player))
   {
      //change the player to the quake player
      %player.changeDatablock(PlayerQuakeArmor);
      
      //message the client
      messageClient(%client,'',"\c6You are now the Quake player!");
   }
}


Now when you type /beQuake it will attempt to turn you into the quake player.
« Last Edit: January 25, 2017, 12:01:03 PM by elm »

Wat? the quake player is the player itself?

Edit: nvm updated :-p
« Last Edit: January 25, 2017, 12:11:40 PM by FelipeO_O_ »



All server commands (that you type like: /clearbricks) are prefixed with ServerCmd. So if you want a command to be called /beQuake then the code will look like:

function serverCmdBeQuake(%client)
{
   //define the player object
   %player = %client.player;
   
   //check if the player exists
   if(isObject(%player))
   {
      //change the player to the quake player
      %player.changeDatablock(PlayerQuakeArmor);
      
      //message the client
      messageClient(%client,'',"\c6You are now the Quake player!");
   }
}


Now when you type /beQuake it will attempt to turn you into the quake player.
Thanks locking topic.