SA-MP Forums Archive
Radio problem. - 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: Radio problem. (/showthread.php?tid=80925)



Radio problem. - kukars22 - 07.06.2009

Hello, I have little problem with my script... When Im writing in /r [text] I dont see my name but it should be shown:

Код:
format(string, 256, "(( Radio: %s %s: %s ))", radioranks, sendername, cmdtext[3]);
	SendClientMessage(i, 0x01FCFFC8, string);
I have inserted: sendername but I just see: (( Radio: Civ : text )) I hope someone will help me


Re: Radio problem. - Luka P. - 07.06.2009

You first must get player name.

pawn Код:
new sendername[MAX_PLAYER_NAME]; // you probably have that
new string[256];
pawn Код:
GetPlayerName(playerid,sendername,sizeof(string));

format(string,sizeof(string),"(( Radio: %s %s: %s ))", radioranks, sendername, cmdtext[3]);
SendClientMessage(i, 0X01FCFFC8, string);



Re: Radio problem. - kukars22 - 07.06.2009

Ahh I forgot about GetPlayerName , Thanks


Re: Radio problem. - Luka P. - 07.06.2009

Did you test if it work?


Re: Radio problem. - kukars22 - 07.06.2009

Of course I tested, and it works