Upaluppa Posted February 26, 2009 Author Share Posted February 26, 2009 All I did for that was I took a construction made using ADe's shape maker thing on CheatSync, took a few chunks out, then used a single if statement: x = getfloat(pobj+0x30); //Save the player's x coordy = getfloat(pobj+0x34); //Save the player's y coordportalcenterx = ...; //TO BE DEFINED BY YOU...portalcentery = ...; //TO BE DEFINED BY YOU...dx = x - portalcenterx; //Calc the distance on the x axisdy = y - portalcentery; //Calc the distance on the y axisif(sqrt(dx^2 + dy^2) < 5.0) //Calc two dimensional distance using dx and dy, and if that value is less than 5.0 (the player is within 5.0 units of the portal center)Â Â //do something... Hey thank you a lot mate ! That was what I was looking for. I`ll modify it to fit my needs and then I can just copy and paste it over and over again and only need to change the coordinates ! By the way: x = getfloat(pobj+0x30); //Save the player's x coord y = getfloat(pobj+0x34); //Save the player's y coord You only get the x and y coordinates there ! I thought the z coordinate must be defined aswell... I thought, what happens if I create a portal INSIDE the Vice Point Mall interior, for example. If I try to teleport to this portal inside the mall, how does the Cheatdevice know, that the portal is underneath the normal map ? I guess it will teleport me onto the malls roof instead of inside, because the roof is located exactly over the mall interior... Edit: Ah forget it, I think you probably wouldn`t post it like this if it was required, so I`ll just try it like this and see how it`s going to look ingame. Thanks again ! You could, just make another variable called z and dz, only you would need to add && abs(dz) < 5.0 to the if statement. Alright mate ! I`ll do that... I knew that I could create a third variable for the height, but I did not know that the cheat also works, if you leave it out ! Looks like you can leave the height variable out if you place it somewhere at an open space. I never knew that, I always used x, y and z coordinates, might be usefull for my pedspawning cheat, because it somehow has problems with the z coordinate. For whatever reason the peds sometimes spawn at the wrong height, underneath the map to be exact... Maybe it works better if I leave the z value out ? I`m going to try it and compare the results. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now