Showing where teleporting! -
IvancheBG - 23.03.2011
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.
Re: Showing where teleporting! -
IvancheBG - 23.03.2011
waht callback do i need to show you
Re: Showing where teleporting! -
Biesmen - 23.03.2011
You're probably sending the message on this way:
pawn Код:
SendClientMessage(playerid, color, string);
Try to use SendClientMessageToAll.
pawn Код:
SendClientMessageToAll(color, string);
Re: Showing where teleporting! -
Medal Of Honor team - 23.03.2011
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;
}
Re: Showing where teleporting! -
IvancheBG - 23.03.2011
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.
Re: Showing where teleporting! -
Biesmen - 23.03.2011
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?
Re: Showing where teleporting! -
IvancheBG - 23.03.2011
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;
}
Re: Showing where teleporting! -
xRyder - 23.03.2011
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.
Re: Showing where teleporting! -
Medal Of Honor team - 23.03.2011
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
Re: Showing where teleporting! -
xRyder - 23.03.2011
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....