[Tutorial] Teleport command with extras
#21

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

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

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

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

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

Nice tuto CJ!
Reply
#27

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);

?
Reply
#28

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


Forum Jump:


Users browsing this thread: 1 Guest(s)