Making a TP - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Making a TP (
/showthread.php?tid=245417)
Making a TP - ColdIce - 31.03.2011
Hello. I got a neon system on my server that is located in the country, and I would like to be able to use a command to tp there. Is there any easy way doing that?
Re: Making a TP -
[ProX]BlueFire - 31.03.2011
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/country", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, Float:x, Float:y, Float:z);//replace the :: Float:x, Float:y, Float:z with ur cords
return 1;
}
return 0;
}
Re: Making a TP - ColdIce - 31.03.2011
Quote:
Originally Posted by [ProX]BlueFire
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/country", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, Float:x, Float:y, Float:z);//replace the :: Float:x, Float:y, Float:z with ur cords return 1; } return 0; }
|
Where to put it? Just use it as a FS? And how do I know the cords?(never done this before)
Re: Making a TP -
bijoyekuza - 31.03.2011
if (strcmp("/country", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, Float
, Float:y, Float:z);//replace the :: Float
, Float:y, Float:z with ur cords return 1; }
Under OnPlayerCommandText
Re: Making a TP -
Jochemd - 31.03.2011
You can better start using ZCMD/YCMD in stead of using the slow strcmp. A bit off-topic but a nice hint.
Re: Making a TP -
Vlad_Dubonos - 31.03.2011
Oohh he's a begginer man
here's no FS for teleport for 1 place
i can give you for more places and you can change it
Take it enjoy
https://sampforum.blast.hk/showthread.php?tid=73339
Re: Making a TP -
legodude - 31.03.2011
rastafariii!
XD
ill make a dynamic tp system when i have time and in the mood for it.
and when not playing minecraft
Re: Making a TP - ColdIce - 31.03.2011
Quote:
Originally Posted by Vlad_Dubonos
|
Does not work. I put the Tele pwn/amx in the FS, then the gamemode in gamemode and .inc file in pawno/include file
It just says unknown commands. Help!
Re: Making a TP -
Vlad_Dubonos - 31.03.2011
Quote:
Originally Posted by ColdIce
Does not work. I put the Tele pwn/amx in the FS, then the gamemode in gamemode and .inc file in pawno/include file
It just says unknown commands. Help!
|
And added to server.cfg filterscripts:name of the filterscripts?
Re: Making a TP - ColdIce - 31.03.2011
Quote:
Originally Posted by Vlad_Dubonos
And added to server.cfg filterscripts:name of the filterscripts?
|
Forgot it
Now it works
This is awesome, but there is one thing that bugs me. Do I have to have it like "/tele neon" ? Cant I just do /neon and teleport?