SA-MP Forums Archive
Help with /enter and /exit command - 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: Help with /enter and /exit command (/showthread.php?tid=654659)



Help with /enter and /exit command - AlfaSufaIndo - 02.06.2018

I want to make /enter and /exit command, but i'm very confused.. can you guys help me with an example? I use ZCMD


Re: Help with /enter and /exit command - HoNEYKISS - 02.06.2018

Enter-exit command to where?


Re: Help with /enter and /exit command - HoNEYKISS - 02.06.2018

Zcmd Commands are made like this:
Код:
CMD:enter(playerid, params[])
{
        //add code here
	return 1;
}
On the line
Quote:

Add code here

you have to add SetPlayerPos(playerid, 0.0, 0.0, 3.0);with your own Xyz position
If you think these are Alien words and you do 't understand anything then send me a private message and I will help you


Re: Help with /enter and /exit command - AlfaSufaIndo - 02.06.2018

Oh so I have to determine the coordinates first? Do all coordinates have to be made /enter and /exit commands first one by one?


Re: Help with /enter and /exit command - HoNEYKISS - 02.06.2018

Quote:
Originally Posted by AlfaSufaIndo
Посмотреть сообщение
Oh so I have to determine the coordinates first? Do all coordinates have to be made /enter and /exit commands first one by one?
Yes,Do you know how to find the position of a place?


Re: Help with /enter and /exit command - AlfaSufaIndo - 02.06.2018

By typing the /save command somewhere


Re: Help with /enter and /exit command - HoNEYKISS - 02.06.2018

Quote:
Originally Posted by AlfaSufaIndo
Посмотреть сообщение
By typing the /save command somewhere
Yes after you find the position go to SetPlayerPos(playerid, 0.0, 0.0, 3.0); and replace the xyz with your own position In the savedpositions notes it will be AddPlayerClass and some numbers then paste the numbers in the setplayerpos


Re: Help with /enter and /exit command - HoNEYKISS - 02.06.2018

in the end it will be something like this

Код:
CMD:enter(playerid, params[])
{
        SetPlayerPos(playerid,blablabla);
	return 1;
}



Re: Help with /enter and /exit command - AlfaSufaIndo - 02.06.2018

How to group all pickup positions into one variable?
Is this the right way?
PHP код:
new    EntrancePickups 
{
    
CreatePickup(modeltypeFloat:XFloat:YFloat:Zvirtualworld 0)
    
CreatePickup(modeltypeFloat:XFloat:YFloat:Zvirtualworld 0)
    
CreatePickup(modeltypeFloat:XFloat:YFloat:Zvirtualworld 0)




Re: Help with /enter and /exit command - AlfaSufaIndo - 02.06.2018

So I want the /enter command can only be used if it is in the entrance pickup