SetVehiclePos(playerid,x,y,z); (O_o)
and why are you defining a new sring? you can just add SendClientMessage(playerid,-1,"Text") (-_-) |
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.
|
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; } } And then you can change the X, Y, and Z coordinates, the name of the teleport, and a little message to the player :P |
WorldInterior
What about the
Код:
WorldInterior And you better to add this on Scripting Discussion Any way nice ! |
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!
|
#include < name >
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!
|
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!
|
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! |