Making a TP
#1

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

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;
}
Reply
#3

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)
Reply
#4

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

You can better start using ZCMD/YCMD in stead of using the slow strcmp. A bit off-topic but a nice hint.
Reply
#6

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

rastafariii!
XD
ill make a dynamic tp system when i have time and in the mood for it.
and when not playing minecraft
Reply
#8

Quote:
Originally Posted by Vlad_Dubonos
Посмотреть сообщение
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
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!
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 2 Guest(s)