Results 1 to 9 of 9

Thread: Warn Script

  1. #1
    Big Cheese Captain
    Join Date
    Jun 2013
    Posts
    1,029

    Warn Script

    If you would like to use this on your server, feel free to. Just give me credit in the script
    PHP Code:
    //Coded by iMask
    findplayer("accountname").addWeapon(this.name);

    function 
    onActionServerSide() {
      
    this.targetID player.chat.substring(5).trim();
      for (
    temp.plallplayers) {
        if (
    temp.pl.account == this.targetID) {
          
    temp.pl.chat "I have been warned! Type unstick me to return.";
          
    pl.setlevel2("level_name.nw"3030); //type in the level name you want
          
    player.chat "Warned the player" SPC this.targetID;
        }
      }
    }

    //#CLIENTSIDE
    function onPlayerChats() {
      if (
    player.chat.starts("/warn")) {
        
    triggerserver("gui"this.nameNULL);
      }

    iEra Developer / SFX Admin

    Need help? Contact me:
    Email: [email protected]

  2. #2
    Veteran KevinBlue's Avatar
    Join Date
    Dec 2014
    Location
    Australia
    Posts
    335
    Quote Originally Posted by iMask View Post
    If you would like to use this on your server, feel free to. Just give me credit in the script
    PHP Code:
    //Coded by iMask
    findplayer("accountname").addWeapon(this.name);

    function 
    onActionServerSide() {
      
    this.targetID player.chat.substring(5).trim();
      for (
    temp.plallplayers) {
        if (
    temp.pl.account == this.targetID) {
          
    temp.pl.chat "I have been warned! Type unstick me to return.";
          
    pl.setlevel2("level_name.nw"3030); //type in the level name you want
          
    player.chat "Warned the player" SPC this.targetID;
        }
      }
    }

    //#CLIENTSIDE
    function onPlayerChats() {
      if (
    player.chat.starts("/warn")) {
        
    triggerserver("gui"this.nameNULL);
      }

    How do they make their own server?
    My Levels Thread


  3. #3
    Quote Originally Posted by KevinBlue View Post
    How do they make their own server?
    To make you're own server you need to visit the playerworlds shop and purchase one, I think they are around $50 per year, I could be wrong. Note. They are a lot of hard work to manage, and if you do not know what you are doing it is likely that staff will not stick around.
    Noof was here.

  4. #4
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    I see this script to be quite useless actually. What's the point of warning someone if you're unable to log it? Try creating client flag variables to store the information which can be accessed later on with a command.


    I saw. I conquered. I came.


  5. #5
    Big Cheese Captain
    Join Date
    Jun 2013
    Posts
    1,029
    Quote Originally Posted by Grief Hero View Post
    I see this script to be quite useless actually. What's the point of warning someone if you're unable to log it? Try creating client flag variables to store the information which can be accessed later on with a command.
    How would you create client flag variables? Is it something like this?

    PHP Code:
    //...code here
      
    onCreateFlag();

    function 
    onCreateFlag () {
      
    findplayer(this.targetID);
      
    clientr.lastwarn "Warned by" SPC //account name here

    iEra Developer / SFX Admin

    Need help? Contact me:
    Email: [email protected]

  6. #6
    Veteran
    Join Date
    Feb 2014
    Location
    Classic iPhone
    Posts
    316
    Quote Originally Posted by iMask View Post
    If you would like to use this on your server, feel free to. Just give me credit in the script
    PHP Code:
    //Coded by iMask
    findplayer("accountname").addWeapon(this.name);

    function 
    onActionServerSide() {
      
    this.targetID player.chat.substring(5).trim();
      for (
    temp.plallplayers) {
        if (
    temp.pl.account == this.targetID) {
          
    temp.pl.chat "I have been warned! Type unstick me to return.";
          
    pl.setlevel2("level_name.nw"3030); //type in the level name you want
          
    player.chat "Warned the player" SPC this.targetID;
        }
      }
    }

    //#CLIENTSIDE
    function onPlayerChats() {
      if (
    player.chat.starts("/warn")) {
        
    triggerserver("gui"this.nameNULL);
      }

    Inbox me ASAP
    2005. BTK, Jin Dynasty.

  7. #7
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Why not use findplayer() instead of looping through all the players on the server?
    -Johnaudi

  8. #8
    When I make the weapon .. What did you name it

  9. #9
    What do I name the weapon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •