SA-MP Forums Archive
question about player name - 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: question about player name (/showthread.php?tid=117617)



question about player name - rs2fun111 - 01.01.2010

is there any way , change %s to like %y ?


Re: question about player name - KnooL - 01.01.2010

why would you want that?


Re: question about player name - rs2fun111 - 01.01.2010

because if i use;

pawn Code:
new str[128];
    new PR = PInfo[playerid][Rank];
    format(str, 128, "%s Your Rank Is: %d: \"%s\"", PR, RankInfo[PR][RName]);
    SendClientMessage(playerid, 0x7CFC00AA, str);
then it takes 2 time namne -.-


Re: question about player name - KnooL - 01.01.2010

Post the whole thing because I don't fully understand the format line.

this is how i should do it:

[RANKVARIABLE] Your Rank Is: Enforcer/rankname

pawn Code:
dcmd_myrank(playerid,params[])
{
new str[128];
#pragma unused params
if(PInfo[playerid][Rank] == 1)
{
format(str,sizeof(string),"[Rank number:%d] Your rank is: Enforcer",PInfo[playerid][Rank]);
SendClientMessage(playerid, 0x7CFC00AA, str);
}
else if(..................)
{
..........
}
and so on