Author Topic: Help on adding cmds in a server  (Read 3123 times)

0 Members and 1 Guest are viewing this topic.

Offline Rodrigo

  • Street Thug
  • *
  • Posts: 7
    • View Profile
Help on adding cmds in a server
« on: January 05, 2013, 04:23:51 am »
Hello! :)

I use sql server and I have a script called: "cmds.nut" where I can find and edit all the commands of the server.

I've noticed that there isn't a /c wep command and I'm requesting your help to teach me how to add that command.

I'd like to add /c wep command and, if possible, /c spawnwep set...

This is a part of the script:
Code: [Select]
if ( cmd == "register" )
  {
   if ( status[ player.ID ].IsReg == true ) ePrivMessage( "[Error] - You're Already Registered!", player );
   else if ( !text ) ePrivMessage( "Syntax, /c " + cmd + " <Password>", player );
   else Register( player, text );
  }
  else if ( ( cmd == "commands" ) || ( cmd == "cmds" ) || ( cmd == "command" ) )
  {
      ePrivMessage( "Commands for Registered Users:", player );
  ePrivMessage( "/c register, login, stats, hp, armour, loc, script", player );
  ePrivMessage( "forum, goto, heal, fix, gotoloc, saveloc, nogoto", player );
  ePrivMessage( "server, admins, buyprop, sellprop, shareprop", player );
  ePrivMessage( "delshareprop, myprops, myshareprops, home", player );
  ePrivMessage( "mycars, mysharecars, buycar, sellcar, sharecar", player );
  ePrivMessage( "delsharecar, getcar, spree, level, cash", player );
  }
  else if ( ( cmd == "script" ) || ( cmd == "scripts" ) || ( cmd == "info" ) ) EMessage( ">> MaDKiLLeR's DM / RPG Script v1.0 by [VU_T]MaDKiLLeR." ), EMessage( "Credits: " + Credits );
  else if ( cmd == "server" ) EMessage( ">> Server: " + GetServerName() + " ModeName: " + GetGamemodeName() + ", MapName: " + GetMapName() + ", Slots: " + GetMaxPlayers() + "." );
  else if ( cmd == "forum" ) EMessage( ">> Forum: [ " + www.asa-clan.comoj.com + " ]" );
  else if ( cmd == "gotoloc" )
  {
      if ( !text ) ePrivMessage( "Syntax, /c " + cmd + " <Location Name>", player );
  else if ( player.Health < 50 ) ePrivMessage( "Your Health is To low..", player );
  else if ( !player.IsSpawned ) ePrivMessage( "You haven't spawned yet..", player );
  else if ( !CheckLoc( text ) ) ePrivMessage( "Invalid Location..", player );
  else
  {
     GotoLoc( player, text );
  }
  }
  else if ( cmd == "level" )
  {
      if ( !text ) PrivMessage( "Syntax, - /c " + cmd + " <Nick/ID>", player );
  else
  {
     local plr = GetPlayer( text );
if ( !plr ) PrivMessage( "Error - Invalid Player", player );
else if ( !status[ plr.ID ].IsReg ) PrivMessage( "The Player is not Registered..", player );
else PrivMessage( plr.Name + "'s Level:[ " + status[ plr.ID ].Level + " ]", player );
  }
  }

See yah! :)

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: Help on adding cmds in a server
« Reply #1 on: January 05, 2013, 02:28:39 pm »
Lock this topic and make a new topic on VC:MP Unofficial Forum !

This (official) forum is just for Pawn Scripting (and Mirc ? :s) , not for Squirrel.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Help on adding cmds in a server
« Reply #2 on: January 05, 2013, 02:58:47 pm »
Lock this topic and make a new topic on VC:MP Unofficial Forum !

This (official) forum is just for Pawn Scripting (and Mirc ? :s) , not for Squirrel.

This is correct. Thread locked.
Do not PM me for support.