[Include] Teleports.
#1

-REMOVED.
Reply
#2

Nice snippet. It isnt really a fs or inc...
Reply
#3

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

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!
Reply
#5

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. -_-
Reply
#6

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

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.
Reply
#8

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.
Reply
#9

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 !
Reply
#10

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
Reply
#11

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!
Reply
#12

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. :/
Reply
#13

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!
Reply
#14

Are you sure you can script?
Reply
#15

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?
Reply
#16

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
Reply
#17

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)