Simple teleport command error
#1

  • D:\Games\GTA San Andreas\samp03bsvr_RC4-1_win32\gamemodes\ViltRP.pwn(658 ) : error 004: function "PlayerToPoint" is not implemented
    D:\Games\GTA San Andreas\samp03bsvr_RC4-1_win32\gamemodes\ViltRP.pwn(668 ) : error 004: function "PlayerToPoint" is not implemented
    Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

2 Errors.

pawn Код:
#include <a_samp>

forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0x00BCFFFF,"_________[Help Command Text]_________");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line1_________________|");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line2_________________|");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line3_________________|");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line4_________________|");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line5_________________|");

        return 1;
    }
    if(strcmp(cmdtext, "/enter", true, 10)==0)
    {
        if(PlayerToPoint(3.0,playerid,413,1700,-2249.9922))
        {
            SendClientMessage(playerid,0x00ABFFFF,"Welcome to the LAPD");
            SetPlayerInterior(playerid, 14);
            SetPlayerPos(playerid,1550.9105,-1683.8849,1723.1050);
            return 1;
        }
    }
    if(strcmp(cmdtext, "/exit", true, 10)==0)
    {
        if(PlayerToPoint(3.0,playerid,1550.9105,-1683.8849,1723.1050))
        {
            SetPlayerPos(playerid,413,1700,-2249.9922);
            return 1;
        }
    }
    return 0;
}
Why do I get that problem?
Reply
#2

ok hy here i have the script you need to use this

[SCRIPT] if(!strcmp("/enter", cmdtext, true))
{
if(IsPlayerAdmin(playerid)==1)
{
SetPlayerPos(playerid, -2277.5476, 471.9923, 78.4079); //playerid,and than the coords
SetPlayerFacingAngle(playerid, 118.0004); // wher the player looks
SendClientMessage(playerid,0x050CFAFF, "You Are Teleported");
return 1;
}
}[/SCRIPT]
Reply
#3

Use IsPlayerInRangeOfPoint instead of PlayerToPoint...
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0x00BCFFFF,"_________[Help Command Text]_________");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line1_________________|");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line2_________________|");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line3_________________|");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line4_________________|");
        SendClientMessage(playerid,0x00BCFFFF,"|_____________Line5_________________|");

        return 1;
    }
    if(strcmp(cmdtext, "/enter", true, 10)==0)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.0,413,1700,-2249.9922))
        {
            SendClientMessage(playerid,0x00ABFFFF,"Welcome to the LAPD");
            SetPlayerInterior(playerid, 14);
            SetPlayerPos(playerid,1550.9105,-1683.8849,1723.1050);
            return 1;
        }
    }
    if(strcmp(cmdtext, "/exit", true, 10)==0)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.0,1550.9105,-1683.8849,1723.1050))
        {
            SetPlayerPos(playerid,413,1700,-2249.9922);
            return 1;
        }
    }
    return 0;
}
And remove the forward PlayerToPoint thingy. No need anymore.
I hope it works.

Greetz.
Reply
#5

I don't know if it works, because when I login, It says: Stay within the world bounders :S.
what can that be?
Reply
#6

Anywhere in your code is:
SetPlayerWorldBounds

This is the cause of the message. Just check the code for this.
Reply
#7

Hmm, There is no SetPlayerWorldBounds

Do I have to forward that?
Reply
#8

No. Do you have any Filterscripts loaded? If yes, check them.
Reply
#9

try it:
pawn Код:
#include <float>
Reply
#10

Quote:
Originally Posted by speediekiller2
Посмотреть сообщение
ok hy here i have the script you need to use this

[SCRIPT] if(!strcmp("/enter", cmdtext, true))
{
if(IsPlayerAdmin(playerid)==1)
{
SetPlayerPos(playerid, -2277.5476, 471.9923, 78.4079); //playerid,and than the coords
SetPlayerFacingAngle(playerid, 118.0004); // wher the player looks
SendClientMessage(playerid,0x050CFAFF, "You Are Teleported");
return 1;
}
}[/SCRIPT]
fail

.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)