27.02.2012, 14:06
(
Последний раз редактировалось xXitsgodzillaXx; 27.02.2012 в 16:35.
)
-REMOVED.
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
#include < name >
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! |