SA-MP Forums Archive
[Include] Teleports. - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Teleports. (/showthread.php?tid=321531)



Teleports. - xXitsgodzillaXx - 27.02.2012

-REMOVED.


Re: Teleports. - legodude - 27.02.2012

Nice snippet. It isnt really a fs or inc...


Re: Teleports. - xXitsgodzillaXx - 27.02.2012

Quote:
Originally Posted by legodude
Посмотреть сообщение
Nice snippet. It isnt really a fs or inc...
thanks! hah yeah. :P


Re: Teleports. - ShOoBy - 27.02.2012

SetVehiclePos(playerid,x,y,z); (O_o)
and why are you defining a new sring? you can just add SendClientMessage(playerid,-1,"Text") (-_-)

EDIT : Sorry , but I saw just some functions that users have to edit. But I suggest you to make a new script with a simple dialog, and add your own teleports there, and post it as a "Global Teleportation Menu" or make a tutorial if you want to teach others how to script a teleportation command. Good luck budy!


Re: Teleports. - xXitsgodzillaXx - 27.02.2012

Quote:
Originally Posted by ShOoBy
Посмотреть сообщение
SetVehiclePos(playerid,x,y,z); (O_o)
and why are you defining a new sring? you can just add SendClientMessage(playerid,-1,"Text") (-_-)
not everybody is perfect. -_-


Re: Teleports. - TheArcher - 27.02.2012

128 cells are enough for whole the commands + i dont think someone will copy & paste this.


Re: Teleports. - Konstantinos - 27.02.2012

Why do you use [Include] Tag if you don't have include. Better change it to FilterScript. Also, about the format is useless. Just send the message with SendClientMesage.


Re: Teleports. - xXitsgodzillaXx - 27.02.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Why do you use [Include] Tag if you don't have include. Better change it to FilterScript. Also, about the format is useless. Just send the message with SendClientMesage.
okay first. its not a FS its somthing that someone will "include" in their GM. second. im sorry i can make things the way you want it. third. have nice day.


Re: Teleports. - Mr.WAngD0 - 27.02.2012

Quote:
Originally Posted by xXitsgodzillaXx
Посмотреть сообщение
Hi guys i just thought i make some teleports that some people can use.
This is more for the new scripters that are out there.
For all the more professinal scripters, this is just somthing i decided to do for the community. So if they dont know how to make a teleport filterscript they can just add this to thier GM.
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp("/teleportA",cmdtext,true) == 0)
     {
     new str[128];
     format(str,sizeof(str),"You Have Been Teleported");
     SendClientMessage(playerid,-1,str);
     SetVehiclePos(playerid,x,y,z);
     SetPlayerPos(playerid,x,y,z);
     return 1;
     }
	if(strcmp("/teleportB",cmdtext,true) == 0)
     {
     new str[128];
     format(str,sizeof(str),"You Have Been Teleported");
     SendClientMessage(playerid,-1,str);
     SetVehiclePos(playerid,x,y,z);
     SetPlayerPos(playerid,x,y,z);
     return 1;
     }
	if(strcmp("/teleportC",cmdtext,true) == 0)
     {
     new str[128];
     format(str,sizeof(str),"You Have Been Teleported");
     SendClientMessage(playerid,-1,str);
     SetVehiclePos(playerid,x,y,z);
     SetPlayerPos(playerid,x,y,z);
     return 1;
     }
  if(strcmp("/teleportD",cmdtext,true) == 0)
     {
     new str[128];
     format(str,sizeof(str),"You Have Been Teleported");
     SendClientMessage(playerid,-1,str);
     SetVehiclePos(playerid,x,y,z);
     SetPlayerPos(playerid,x,y,z);
     return 1;
     }
  if(strcmp("/teleportE",cmdtext,true) == 0)
     {
     new str[128];
     format(str,sizeof(str),"You Have Been Teleported");
     SendClientMessage(playerid,-1,str);
     SetVehiclePos(playerid,x,y,z);
     SetPlayerPos(playerid,x,y,z);
     return 1;
     }
  if(strcmp("/teleportF",cmdtext,true) == 0)
     {
     new str[128];
     format(str,sizeof(str),"You Have Been Teleported");
     SendClientMessage(playerid,-1,str);
     SetVehiclePos(playerid,x,y,z);
     SetPlayerPos(playerid,x,y,z);
     return 1;
     }

}
So all you have to do is add this code to your gamemode. but make sure that its under "public OnPlayerCommandText(playerid, cmdtext"
And then you can change the X, Y, and Z coordinates, the name of the teleport, and a little message to the player :P
What about the
Код:
WorldInterior
I make up a teleport like this.but i dont get the right to compile the gm becouse of that !
And you better to add this on Scripting Discussion Any way nice !


Re: Teleports. - xXitsgodzillaXx - 27.02.2012

Quote:
Originally Posted by Mr.WAngD0
Посмотреть сообщение
What about the
Код:
WorldInterior
I make up a teleport like this.but i dont get the right to compile the gm becouse of that !
And you better to add this on Scripting Discussion Any way nice !
haha thanks! i was originally going to but, i wasnt sure if it was the right material for that section :P


Re: Teleports. - Konstantinos - 27.02.2012

If someone includes it and use OnPlayerCommandText on his/her Gamemode, it will give him warning that the callback is already defined. I hope to understand it. Have a nice day too!


Re: Teleports. - xXitsgodzillaXx - 27.02.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
If someone includes it and use OnPlayerCommandText on his/her Gamemode, it will give him warning that the callback is already defined. I hope to understand it. Have a nice day too!
thats why i said to put it "under" that lol. please read before you comment. :/


Re: Teleports. - Konstantinos - 27.02.2012

Do you really understand what include means? Add the code at an inc file and add that to the Gamemode
pawn Код:
#include < name >
I mean if someone did this it will give him warning/error.

Please read before you comment.

Quote:
Originally Posted by Dwane
Посмотреть сообщение
If someone includes it and use OnPlayerCommandText on his/her Gamemode, it will give him warning that the callback is already defined. I hope to understand it. Have a nice day too!



Re: Teleports. - steki. - 27.02.2012

Are you sure you can script?


Re: Teleports. - xXitsgodzillaXx - 27.02.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
If someone includes it and use OnPlayerCommandText on his/her Gamemode, it will give him warning that the callback is already defined. I hope to understand it. Have a nice day too!
woohoo i missread somthing. feel good about yourself?


Re: Teleports. - xXitsgodzillaXx - 27.02.2012

Quote:
Originally Posted by ShOoBy
Посмотреть сообщение
SetVehiclePos(playerid,x,y,z); (O_o)
and why are you defining a new sring? you can just add SendClientMessage(playerid,-1,"Text") (-_-)

EDIT : Sorry , but I saw just some functions that users have to edit. But I suggest you to make a new script with a simple dialog, and add your own teleports there, and post it as a "Global Teleportation Menu" or make a tutorial if you want to teach others how to script a teleportation command. Good luck budy!
thanks i might try that :P


Re: Teleports. - TheBetaFox - 27.02.2012

This is not an include; nor a filterscript. It does not belong in this section.
It's not even a tutorial, as it doesn't describe anything! It's just a snippet, and this belongs in the Useful Snippets thread, if it's still out there.
I don't see why'd you make a new thread for something that's so useless and for which there are already a trillion tutorials for. You could've made a SetPlayerPosEx function for easier teleporting with angle, teleport name and etc which would send a message to everyone with the teleport name and who teleported (etc.. you get the idea) and make a tutorial for it and would've been more than a trillion times more useful than that random piece of code you slapped on a post and made a thread for.