Showing where teleporting!
#1

When i teleport somewhere in my server says:
My name was teleported to LosSantos.But other players didnt see where i am going.Please help.
Reply
#2

waht callback do i need to show you
Reply
#3

You're probably sending the message on this way:
pawn Код:
SendClientMessage(playerid, color, string);
Try to use SendClientMessageToAll.
pawn Код:
SendClientMessageToAll(color, string);
Reply
#4

You can do something like this


pawn Код:
if(strcmp("/tele", cmd, true) == 0)
    {
        new str1[128];
        new names[MAX_PLAYER_NAME];
        new Float:AX, Float:AY, Float:AZ;
        GetPlayerName(playerid, names, sizeof(names));
        AX = 123;
        AY = 123;
        AZ = 123;
        SetPlayerPos(playerid, AX, AY, AZ);
        format(str1, sizeof(str1), "%s teleported to %f %f %f", names, Float:AX, Float:AY, Float:AZ);
        SendClientMessageToAll(ADMINFS_MESSAGE_COLOR, str1);
        return true;
    }
Reply
#5

It Shows me this error when compile
Код:
C:\Documents and Settings\user\Desktop\server samp\gamemodes\test.pwn(118) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\user\Desktop\server samp\gamemodes\test.pwn(130) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\user\Desktop\server samp\gamemodes\test.pwn(136) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\user\Desktop\server samp\gamemodes\test.pwn(143) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\user\Desktop\server samp\gamemodes\test.pwn(150) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#6

Quote:
Originally Posted by Medal Of Honor team
Посмотреть сообщение
You can do something like this


pawn Код:
if(strcmp("/tele", cmd, true) == 0)
    {
        new str1[128];
        new names[MAX_PLAYER_NAME];
        new Float:AX, Float:AY, Float:AZ;
        GetPlayerName(playerid, names, sizeof(names));
        AX = 123;
        AY = 123;
        AZ = 123;
        SetPlayerPos(playerid, AX, AY, AZ);
        format(str1, sizeof(str1), "%s teleported to %f %f %f", names, Float:AX, Float:AY, Float:AZ);
        SendClientMessageToAll(ADMINFS_MESSAGE_COLOR, str1);
        return true;
    }
This code actually fails.

Don't use that code, ofcourse it will give errors.

Could you show us the code/command when you teleport?
Reply
#7

This is for sf teleport

Код:
if (strcmp("/sf", cmdtext, true, 10) == 0)
	{
        SetPlayerPos(playerid, -2038.9034, 135.9883, 28.8359);
        SetPlayerFacingAngle(playerid, 0);
        SendClientMessageToAll(playerid, 0x00FFFFAA, "Your have been teleported to SanFierro.");
        return 1;
	}
Reply
#8

Quote:
Originally Posted by Medal Of Honor team
Посмотреть сообщение
You can do something like this


pawn Код:
if(strcmp("/tele", cmd, true) == 0)
    {
        new str1[128];
        new names[MAX_PLAYER_NAME];
        new Float:AX, Float:AY, Float:AZ;
        GetPlayerName(playerid, names, sizeof(names));
        AX = 123;
        AY = 123;
        AZ = 123;
        SetPlayerPos(playerid, AX, AY, AZ);
        format(str1, sizeof(str1), "%s teleported to %f %f %f", names, Float:AX, Float:AY, Float:AZ);
        SendClientMessageToAll(ADMINFS_MESSAGE_COLOR, str1);
        return true;
    }
I hope that this was only an example.

Just give us your code/command for teleport.
Reply
#9

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
This code actually fails.

Don't use that code, ofcourse it will give errors.

Could you show us the code/command when you teleport?
it will not give any error
Reply
#10

Quote:
Originally Posted by Medal Of Honor team
Посмотреть сообщение
it will not give any error
LOL! Mate if you declare
pawn Код:
new Float:AX, Float:AY, Float:AZ; //you declared this as a float value.
You can't set:
pawn Код:
AX = 123;
        AY = 123;
        AZ = 123;
It's just not right....
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)