SA-MP Forums Archive
Teleport Message - 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: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Teleport Message (/showthread.php?tid=205595)



Teleport Message - Linus- - 01.01.2011

I'm sorry, i need help again im noob in scripting
How can i create a code
When i type /sf it sends message to all
Linus- has gone to /sf
help plz


Re: Teleport Message - Grim_ - 01.01.2011

pawn Код:
// under the command
new name[ MAX_PLAYER_NAME ], str[ 50 ];
GetPlayerName( playerid, name, MAX_PLAYER_NAME );
format( str, sizeof( str ), "%s teleported to /sf", name );
SendClientMessageToAll( 0x000000FF, str ); // Change the color to your liking



Re: Teleport Message - Hal - 01.01.2011

SendClientMessageToAll
SendPlayerMessageToAll

Search the wiki.


Re: Teleport Message - HyperZ - 01.01.2011

pawn Код:
if (strcmp("/sf", cmdtext, true, 10) == 0)
{
CMDMessageToAll(playerid,"SF");
//bla bla
return 1;
}
pawn Код:
stock CMDMessageToAll(playerid,command[])
{
    new string[128]; GetPlayerName(playerid,string,sizeof(string));
    format(string,sizeof(string),"[Teleport]: %s has gone to: /%s",string,command);
    return SendClientMessageToAll(0xFFFF00AA,string);
}



Re: Teleport Message - Linus- - 01.01.2011

omg, clive and grim you both are faster and pro's :P thankssssssss