SA-MP Forums Archive
Please help ( /enter , /exit ) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Please help ( /enter , /exit ) (/showthread.php?tid=413312)



Please help ( /enter , /exit ) - morocco - 04.02.2013

Hello all

Please i want help for how to make point ( /enter and /exit ... ) to HQ

and if one can make Video
Please Help me


Re: Please help ( /enter , /exit ) - Youice - 04.02.2013

I know it's not a complete explanation (but I'm now on ipad) (I apologies):

Using (zcmd)
PHP код:
//using (zcmd)
CMD:enter(playeridparams[])// /exit is the same idea
{
    if(
IsPlayerInRangeOfPoint(playeridradiusxyz))//if player near a specific point (Note:You get the cords)
    
{
        
SetPlayerPos(playeridxyz);//The other cords (where he will be teleported
        
SetPlayerInterior(playeridinterior);//set the interior of the cords
        
SetPlayerVirtualWorld(playeridworld);//Set the virtual world, if needed, it's according to you
    
}
    else {
//if player isn't near this point
        
SendClientMessage(playerid, .color = -1"Your Message");
    }
    return 
1;

Using (strcmp)
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/enter"cmdtexttrue) == 0)//using strcmp
    
{
        if(
IsPlayerInRangeOfPoint(playeridradiusxyz))//if player near a specific point (Note:You get the cords)
        
{
            
SetPlayerPos(playeridxyz);//The other cords (where he will be teleported
            
SetPlayerInterior(playeridinterior);//set the interior of the cords
            
SetPlayerVirtualWorld(playeridworld);//Set the virtual world, if needed, it's according to you
        
}
        else {
//if player isn't near this point
            
SendClientMessage(playerid, .color = -1"Your Message");
        }
        return 
1;
    }
    return 
0;

Edit: if you don't know how to get the cords, (This steps must be occured while on foot, to get accurate pos.)
1- Go ingame, go where you want the position
2- And There type /save [name]
3-open C:\Users\<you>\Documents\GTA San Andreas User Files\SAMP , double click on savedpositions.text
4- you will find your saved cords plus beside it, the name you saved too
5- so to figure out the X,Y,Z >> AddPlayerClass(skin, X,Y,Z,Angle,weap1,ammo1,weap2,ammo2,weap3,ammo3);
6- Copy the X-Y-Z (and that's it, pretty easy)

Further Explain:
We used above : IsPlayerInRangeOfPoint , we use this function to determine if the player is in the specific cords we put-in...

: SetPlayerPos , it's very useful for "teleporting" players from a place to another and with the help of : SetPlayerInterior , it solves a lot of in game visions.
(SetPlayerFacingAngle) <<will help you a lot


Re : Please help ( /enter , /exit ) - morocco - 04.02.2013

Omg . Thank you man !!! <3

but if you want ( if you want ) make Video , please please

Thank you very much


Re: Re : Please help ( /enter , /exit ) - Youice - 04.02.2013

Quote:
Originally Posted by morocco
Посмотреть сообщение
Omg . Thank you man !!! <3

but if you want ( if you want ) make Video , please please

Thank you very much
sure okay, but mine won't be as good as whom already uploaded ones on ******* !!
(some has good quality and tutorials, if you are interested!)


Re : Please help ( /enter , /exit ) - morocco - 04.02.2013

http://postimage.org/image/m9jcck1n3/


Re: Re : Please help ( /enter , /exit ) - Youice - 04.02.2013

Quote:
Originally Posted by morocco
Посмотреть сообщение
it's a "pawno-compiler" error,

try: re-downloading the samp-server (pawno) again,
or as I do run it as administrator!


Re : Please help ( /enter , /exit ) - morocco - 04.02.2013

How ?


Re: Re : Please help ( /enter , /exit ) - Youice - 04.02.2013

Quote:
Originally Posted by morocco
Посмотреть сообщение
How ?
press right-click > Run As > Administrator > okay

(note: Im not such good with compiler errors) ( I apologies )


Re: Please help ( /enter , /exit ) - Rayan_black - 04.02.2013

OFFT: You're morroco from lscnr?...


Re : Re: Re : Please help ( /enter , /exit ) - morocco - 04.02.2013

Quote:
Originally Posted by Youice
Посмотреть сообщение
press right-click > Run As > Administrator > okay

(note: Im not such good with compiler errors) ( I apologies )
Thank you very much x10000....

and u don't need to say '' ( I apologies ) " , you help me Enough

thnkas