SA-MP Forums Archive
[Tutorial] Teleport command with extras - 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: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Teleport command with extras (/showthread.php?tid=230341)

Pages: 1 2


Re: Teleport command with extras - SnG.Scot_MisCuDI - 25.03.2011

it says UNKNOWN COMMAND everytime no matter what. please help. This is my code

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/police", cmdtext, true) == 0)
{
SetPlayerPos(playerid, -1573.2988,662.6685,7.1875);
SetPlayerFacingAngle(playerid, 180);
SendClientMessage(playerid, 0x00FFFFAA, "You have been teleported to Police Depo.");
return 1;
}


Re: Teleport command with extras - captainjohn - 09.04.2011

pawn Код:
if(strcmp(cmdtext, "/police", true) == 0)
{
SetPlayerPos(playerid, -1573.2988,662.6685,7.1875);
SetPlayerFacingAngle(playerid, 180);
SendClientMessage(playerid, 0x00FFFFAA, "You have been teleported to Police Depo.");
return 1;
}
Sorry for the delay (I have been really busy these past few weeks)
Hope this helped.


Re: Teleport command with extras - ReneG - 23.12.2011

Can you please tell me what is wrong with my code?

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/enter", cmdtext, true) ==0
        {
            if(IsPlayerInRangeOfPoint(playerid, 10, 1775.9835,-1411.9800,15.7578))
                {
                    SetPlayerVirtualWorld(playerid, 15);
                    SetPlayerPos(playerid, 2285.9827,-1249.7784,1030.5809);
                    return 1;
                {
Once I compile my script, it gives me about 36 different errors. An answer would be greatly appreciated.


Re: Teleport command with extras - vassilis - 23.12.2011

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Can you please tell me what is wrong with my code?

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/enter", cmdtext, true) ==0
        {
            if(IsPlayerInRangeOfPoint(playerid, 10, 1775.9835,-1411.9800,15.7578))
                {
                    SetPlayerVirtualWorld(playerid, 15);
                    SetPlayerPos(playerid, 2285.9827,-1249.7784,1030.5809);
                    return 1;
                {
Once I compile my script, it gives me about 36 different errors. An answer would be greatly appreciated.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/enter", cmdtext, true) ==0
        {
            if(IsPlayerInRangeOfPoint(playerid, 10, 1775.9835,-1411.9800,15.7578))
                {
                    SetPlayerVirtualWorld(playerid, 15);
                    SetPlayerPos(playerid, 2285.9827,-1249.7784,1030.5809);
                                 }
                    return 1;
                }
return 0;
}
hope i helped


Re: Teleport command with extras - ReneG - 24.12.2011

You helped, I just had to tinker around with a few things to get it just right. Repped.


Re: Teleport command with extras - [..PuNISHeR..] - 20.03.2012

Nice tuto CJ!


Re: Teleport command with extras - Leo_Black - 17.04.2012

Nice Tutorial but i m asking myself...
Whats is the diffrence in
Quote:

SetPlayerPos(playerid,);

And
Quote:

PlayerInfo[playerid][pPos_x] = 1961.6560;
PlayerInfo[playerid][pPos_y] = -2176.6799;
PlayerInfo[playerid][pPos_z] = 13.5469;
SetPlayerSpawn(playerid);

?


Re: Teleport command with extras - shaniyal - 08.08.2012

look dude i own a trucking server,if u have played ever trucking server u will know it,there is a command call /rescue after we enter it open us a window in which many rescue points r,so if u will click it,u will be teleport to there,so i was searching about that how to made.
if u know how to make pls help me.