SA-MP Forums Archive
Doesn't show the 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: Doesn't show the name. (/showthread.php?tid=182394)



Doesn't show the name. - Scriptissue - 10.10.2010

I made a script, that when you do /name it will show you the name of the ID.
but It doesn't show the Name
Here is half of it:
pawn Код:
new GivenName[MAX_PLAYER_NAME];
format(string, sizeof(string), "Name: %s.", GivenName);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
Everything is defined, but It doesn't show the name, In addition I don't have any warnings.


Re: Doesn't show the name. - DarrenReeder - 10.10.2010

Did you use

GetPlayerName(playerid, GivenName, sizeof(GivenName));


Re: Doesn't show the name. - GaGlets(R) - 10.10.2010

pawn Код:
new GivenName[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, GivenName, sizeof(GivenName));
format(string, sizeof(string), "Name: %s.", GivenName);
SendClientMessage(playerid, COLOR_WHITE, string);



Re: Doesn't show the name. - Scriptissue - 10.10.2010

Yeah, my bad I forgot that.
I have some thing else.
I tired to add text to a certain command that allows to show how many users are in a certain faction.
So I made that script, the problem it I want to change the color of the Valid and Invalid, to another but I can't, It gives me the same color of the User: %s
pawn Код:
if(PlayerInfo[playerid][pFaction1]) { text4 = "Valid"; } else { text4 = "Invalid";
}
    format(string, sizeof(string), "User: %s.", text4);
                        SendClientMessage(giveplayerid, COLOR_WHITE, string);