Page 4 of 4 FirstFirst ... 2 3 4
Results 31 to 40 of 40

Thread: To learn how to script.

  1. #31
    Veteran Striker's Avatar
    Join Date
    Jul 2013
    Location
    Britian
    Posts
    283
    How do i make a stealth and a gagged script?
    Striker*
    -Have any question, concerns or problems?
    Message me on forums, click on the link if you need help: http://era-go.com/forum/member.php?410-Striker
    Need help on iEra P.M my nick name is Striker*
    -Need further help? My email is:[email protected]
    ENjOY PLAYING IERA!!!!!
    -Gani Artist

  2. #32
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by Striker View Post
    How do i make a stealth and a gagged script?
    Read Gs2 for the Noobs #3
    It will explain player interactions.
    You can use player.alpha = 0; on clientside
    and something like that:
    PHP Code:
    //#CLIENTSIDE
    function onPlayerChats() {
      
    player.chat "*Gagged*";

    -Johnaudi

  3. #33
    El Bacon Hombre Police Commissioner
    Join Date
    Jun 2013
    Location
    United States
    Posts
    247
    Quote Originally Posted by Striker View Post
    How do i make a stealth and a gagged script?
    Stealth generally requires a gani on the player assigned to an attr and a gag/mute script is something that will probably be taught later but should not be attempted at this stage since it does require a few more complicated functions, etc.

    Quote Originally Posted by John View Post
    Read Gs2 for the Noobs #3
    It will explain player interactions.
    You can use player.alpha = 0; on clientside
    and something like that:
    PHP Code:
    //#CLIENTSIDE
    function onPlayerChats() {
      
    player.chat "*Gagged*";

    Please don't give these types of partial explanations as they can mislead the coder.
    He probably wants to know the whole system and not just setting a simple alpha or a simple chat upon the player chatting.
    [email protected]
    *Stefan: You steal my cookies?

  4. #34
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by BboyEatsbacon View Post
    Stealth generally requires a gani on the player assigned to an attr and a gag/mute script is something that will probably be taught later but should not be attempted at this stage since it does require a few more complicated functions, etc.



    Please don't give these types of partial explanations as they can mislead the coder.
    He probably wants to know the whole system and not just setting a simple alpha or a simple chat upon the player chatting.
    This was an example, imagine giving him the whole script.
    Have you been paying attention to his coding? The guy couldn't differ clientside variables from serverside variables.
    -Johnaudi

  5. #35
    El Bacon Hombre Police Commissioner
    Join Date
    Jun 2013
    Location
    United States
    Posts
    247
    Quote Originally Posted by John View Post
    This was an example, imagine giving him the whole script.
    Have you been paying attention to his coding? The guy couldn't differ clientside variables from serverside variables.
    Yes, which is why I told him to wait until a later time where he could successfully complete most of the script on his own.
    [email protected]
    *Stefan: You steal my cookies?

  6. #36
    Aye, so here's how you pass a variable from the Clientside to the serverside.

    PHP Code:
    function onActionServerSide (cmdtemp.var1temp.var2) { //cmd is the first param, you can call this w/e
      
    if (cmd == "boop" ) {
        echo(
    temp.var1 SPC temp.var2);
        
    //Echoes corn dog and dog corn when the player says yo
      
    }
    }

    //#CLIENTSIDE
    function onPlayerChats() {
      if (
    player.chat == "yo") {
        
    temp.variable1 "corn dog";
        
    temp.variable2 "dog corn";
        
    triggerServer("gui"this.name"boop"temp.variable1temp.variable2);
        
    //Send the information to the server
      
    }

    I have not tested this yet because I'm not on my normal PC right now, so if you encounter any errors, I'll fix em later. As for a gag script, try this little hint. Write a player clientr flag when the player is gagged. In a weapon added to every player on the server, read the flag, and if it's added to the player, stop the player from chatting. As an example:

    PHP Code:
    //#CLIENTSIDE
    function onPlayerChats() {
      if(
    player.clientr.isGagged) {
        
    player.chat "wtf man im gagged like omg";
      }

    Last edited by The Doctor; 07-18-2013 at 08:41 PM.

  7. #37
    Veteran Striker's Avatar
    Join Date
    Jul 2013
    Location
    Britian
    Posts
    283
    Okay, I won't do a gagged script because it would probably be bad. I don't know what i need to learn to make a gagged script. What's clientr?
    Striker*
    -Have any question, concerns or problems?
    Message me on forums, click on the link if you need help: http://era-go.com/forum/member.php?410-Striker
    Need help on iEra P.M my nick name is Striker*
    -Need further help? My email is:[email protected]
    ENjOY PLAYING IERA!!!!!
    -Gani Artist

  8. #38
    Quote Originally Posted by Striker View Post
    Okay, I won't do a gagged script because it would probably be bad. I don't know what i need to learn to make a gagged script. What's clientr?
    clientr is the client flag of the player (think of it like a variable..though it's actually an object). The 'r' at the end of it means that these flags are read-only by the clientside (meaning if the player tried to hack and change their clientr flag for ammo to 9999 for instance, it will not work because clientr is read-only for the clientside (player)).

    we also have the normal client flags that can be read/written by both clientside and serverside

    Can you see the benefits of both types of player object's client flags?

  9. #39
    Veteran DippnDonuts's Avatar
    Join Date
    Jul 2013
    Location
    Anero's house
    Posts
    172
    im 10 and turning 11 and i know how to sprint

  10. #40
    Veteran Striker's Avatar
    Join Date
    Jul 2013
    Location
    Britian
    Posts
    283
    yea I can.
    Striker*
    -Have any question, concerns or problems?
    Message me on forums, click on the link if you need help: http://era-go.com/forum/member.php?410-Striker
    Need help on iEra P.M my nick name is Striker*
    -Need further help? My email is:[email protected]
    ENjOY PLAYING IERA!!!!!
    -Gani Artist

Posting Permissions

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