Forum: GTA IV Mod Releases / W.I.P.s


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Like Tree355Likes

Thread: The Mega Script Thread
  

Page 7 of 42 FirstFirst ... 5 6 7 8 9 17 ... LastLast
Results 61 to 70 of 419
  1. #61  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    641
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    125
    Likes Received
    279
    Quote Originally Posted by Colt View Post
    Alright, so I just tried making something along the lines of what I was saying just now, I don't know if it would work but hopefully we can beat it down to something that will...

    Code:
    void WarpField(void){
          for(i = 0;i <= player_loop;i++){
              if(is_whitelisted(i)) continue;
              if(DOES_CHAR_EXIST(players[i].ped)){
                  if(IS_CHAR_IN_ANY_CAR(players[i].ped)){
                      Vehicle pveh;
                      // Something to do with the selected player or blacklisted player in a 50ft radius of player here //
                      GET_CHAR_CAR_IS_USING(players[i].ped,&pveh);
                      GET_NETWORK_ID_FROM_VEHICLE(pveh,&nvid);
                      teleport_char(players[i].ped,-1079.8,-469.7,2.62);
                      WAIT(100);
                  }
                  Print("Unlisted Player Came Within 50ft Of You. They Have Been Moved To The Derby Ring.");
              }
          }
    }
    Now, this is set up with XMC menu (It was the first one I found in my folder, it's also easier to code.) but I've tried to make it so if they are in a 50ft radius of you, they will be teleported to the demolition derby ring. Provided they are in a vehicle.

    I'm not sure how to do it if they are on foot. if(IS_CHAR_ON_FOOT(players[i].ped)){ maybe?

    Any advancements on this?

    EDIT: Had a go at the on foot raidus:

    Code:
    void WarpField(void){
          for(i = 0;i <= player_loop;i++){
              if(is_whitelisted(i)) continue;
              if(DOES_CHAR_EXIST(players[i].ped)){
                  if(IS_CHAR_IN_ANY_CAR(players[i].ped)){
                      Vehicle pveh;
                      // Something to do with the selected player or blacklisted player's coords in a 50ft radius of player here //
                      GET_CHAR_CAR_IS_USING(players[i].ped,&pveh);
                      GET_NETWORK_ID_FROM_VEHICLE(pveh,&nvid);
                      teleport_char(players[i].ped,-1079.8,-469.7,2.62);
                      WAIT(100);
                  }
                  Print("Unlisted Player Came Within 50ft Of You. They Have Been Moved To The Derby Ring.");
              }
          }
              else{
                  if(DOES_CHAR_EXIST(players[i].ped)){
                      if(IS_CHAR_ON_FOOT(players[i].ped)){
                          // Something to do with the selected player or blacklisted player in a 50ft radius of player here //
                          teleport_char(pPlayer,-236.0,795.9,6.20);
                          WAIT(100);
                      }
                      Print("Unlisted Player Came Within 50ft Of You. You Have Been Moved To Middle Park.");
                  }
              }
          }
    wouldn't it be better to teleport them relative to your position? coz if you're already in Middle Park or the Derby Ring its not going to do much good
    Reply With Quote  

  2. #62  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    723
    Downloads
    5
    Uploads
    1
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    190
    Likes Received
    442
    The problem with this is you have to wait for net Id in vehicle , and teleporting chars don't work on foot .. , the best way to tackle this is to teleport yourself away .. Or turn the game cam away from player
    Reply With Quote  

  3. #63  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    743
    Downloads
    0
    Uploads
    0
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    738
    Likes Received
    222
    Quote Originally Posted by ribonucleic View Post
    wouldn't it be better to teleport them relative to your position? coz if you're already in Middle Park or the Derby Ring its not going to do much good
    True, maybe set it up so it checks if they are within 30ft of those 2 coords? I don't know if that's possible.

    Or perhaps just more places, so have it keep checking that they aren't within 50ft of you and if they are, teleport you randomly to another spot.

    Or if you're the host just kick them like someone said previously.
    Mod Videos: http://www.youtube.com/DontGetAngryBro
    Reply With Quote  

  4. #64  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    743
    Downloads
    0
    Uploads
    0
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    738
    Likes Received
    222
    Quote Originally Posted by JDMAlex View Post
    The problem with this is you have to wait for net Id in vehicle , and teleporting chars don't work on foot .. , the best way to tackle this is to teleport yourself away .. Or turn the game cam away from player
    I tried setting the on-foot one up so it would teleport you, not them.
    Mod Videos: http://www.youtube.com/DontGetAngryBro
    Reply With Quote  

  5. #65  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    723
    Downloads
    5
    Uploads
    1
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    190
    Likes Received
    442
    You could do a check .. Check all players in room have if they have model_nikko and if so what one and mark that player for kick or leave room , I think there are natives for these checks
    Reply With Quote  

  6. #66  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    723
    Downloads
    5
    Uploads
    1
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    190
    Likes Received
    442
    Quote Originally Posted by Colt View Post
    I tried setting the on-foot one up so it would teleport you, not them.
    Sorry didn't see that my bad
    Colt likes this.
    Reply With Quote  

  7. #67  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    743
    Downloads
    0
    Uploads
    0
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    738
    Likes Received
    222
    Quote Originally Posted by JDMAlex View Post
    You could do a check .. Check all players in room have if they have model_nikko and if so what one and mark that player for kick or leave room , I think there are natives for these checks
    Hmm.. Interesting. Would what I did above actually work? I think it would, but you have more experience than me, you can see errors where I can't.
    Mod Videos: http://www.youtube.com/DontGetAngryBro
    Reply With Quote  

  8. #68  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    641
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    125
    Likes Received
    279
    Quote Originally Posted by JDMAlex View Post
    You could do a check .. Check all players in room have if they have model_nikko and if so what one and mark that player for kick or leave room , I think there are natives for these checks
    did i not suggest this earlier?

    if you can't teleport a player on foot could you instead attach something to the player and teleport that? presumably the player would be dragged along with whatever was attached
    Reply With Quote  

  9. #69  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    723
    Downloads
    5
    Uploads
    1
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    190
    Likes Received
    442
    Quote Originally Posted by ribonucleic View Post
    did i not suggest this earlier?

    if you can't teleport a player on foot could you instead attach something to the player and teleport that? presumably the player would be dragged along with whatever was attached
    I belive that's been tryed .. Cant remeber what post but zorg mentioned it was tryed , but I can't say it dosent work .. I think it has to do with objects being attached to ped , of you were able to attach the ped to the object physically it has the potential but you need the net I'd from the object to control it.
    Reply With Quote  

  10. #70  
    ribonucleic's Avatar
    ribonucleic is offline Moderator & Developer
    Join Date
    Mar 2012
    Posts
    641
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    125
    Likes Received
    279
    Quote Originally Posted by JDMAlex View Post
    I belive that's been tryed .. Cant remeber what post but zorg mentioned it was tryed , but I can't say it dosent work .. I think it has to do with objects being attached to ped , of you were able to attach the ped to the object physically it has the potential but you need the net I'd from the object to control it.
    well getting the objects properties shouldn't be hard all you need is a handle to the object which you can get when you create it

    something along the lines of:
    Code:
    int object = createobject(..);
    too tired to remember any natives atm, going bed, night all
    Reply With Quote  

Page 7 of 42 FirstFirst ... 5 6 7 8 9 17 ... LastLast
Tags for this Thread

View Tag Cloud

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