SA-MP Forums Archive
"Pilot" infront of chat. - 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: "Pilot" infront of chat. (/showthread.php?tid=123635)



"Pilot" infront of chat. - Sal_Kings - 26.01.2010

Can someone help me I want "Pilot Radio" to show before the text.

Darkman33 Pilot Radio : Hey what sup.


Re: "Pilot" infront of chat. - ¤Adas¤ - 26.01.2010

Use text draws.


Re: "Pilot" infront of chat. - Sal_Kings - 26.01.2010

Quote:
Originally Posted by ¤Adas¤
Use text draws.
What do you mean? What is that.
(I'm a really nooby scripter.)


Re: "Pilot" infront of chat. - kmzr - 26.01.2010

Next time use the script request topic....
pawn Код:
if(!strcmp(cmdtext, "/pr", true, 3)) // /pr = pilot radio..
  {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /pr [text]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s [Pilot Radio]: %s", str, cmdtext[4]);
    SendClientMessageToAll(0xFFA200AA, str);
    return 1;
  }
You will have to modify it to your own needs to check if the player is in an aircraft. Easily done though.

https://sampwiki.blast.hk/wiki/IsPlayerInVehicle


Re: "Pilot" infront of chat. - pspleo - 26.01.2010

Or...

just save the player's name in an temporary variable. Add "Pilot" infront the current player name, send the text you want with SendPlayerText (or some function like that), then reset the player's name to the temporary variable. The line that gets sent also include color difference (name=name color, text=white)

Leo


Re: "Pilot" infront of chat. - Sal_Kings - 26.01.2010

Quote:
Originally Posted by kmzr
Next time use the script request topic....
pawn Код:
if(!strcmp(cmdtext, "/pr", true, 3)) // /pr = pilot radio..
  {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /pr [text]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s [Pilot Radio]: %s", str, cmdtext[4]);
    SendClientMessageToAll(0xFFA200AA, str);
    return 1;
  }
You will have to modify it to your own needs to check if the player is in an aircraft. Easily done though.

https://sampwiki.blast.hk/wiki/IsPlayerInVehicle
Thanks.


Re: "Pilot" infront of chat. - kmzr - 26.01.2010

No problem


Re: "Pilot" infront of chat. - Mike Garber - 26.01.2010

Quote:
Originally Posted by PSPLeo
Or...

just save the player's name in an temporary variable. Add "Pilot" infront the current player name, send the text you want with SendPlayerText (or some function like that), then reset the player's name to the temporary variable. The line that gets sent also include color difference (name=name color, text=white)

Leo
Wow you really don't deserve your stars...


Re: "Pilot" infront of chat. - pspleo - 27.01.2010

Quote:
Originally Posted by mavtias
Quote:
Originally Posted by PSPLeo
[...]

Leo
Wow you really don't deserve your stars...
Why not? I was posting an idea on how the OP should code it. The stars are based on the post count.

Leo


Re: "Pilot" infront of chat. - Kinetic - 27.01.2010

Quote:
Originally Posted by mavtias
Quote:
Originally Posted by PSPLeo
Or...

just save the player's name in an temporary variable. Add "Pilot" infront the current player name, send the text you want with SendPlayerText (or some function like that), then reset the player's name to the temporary variable. The line that gets sent also include color difference (name=name color, text=white)

Leo
Wow you really don't deserve your stars...
Agreed... not only does he not even know what SendClientMessage is, but he is stating that colors are done as (name=name color, text=white)... As any scripter would know, when using SendClientMessage, you cannot input multiple colors. the only way to make it so that the playername was colored is with a global chat and not using SendClientMessage... Those stars should be stripped, regardless of that post count.