Wrong 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)
+--- Thread: Wrong Name (
/showthread.php?tid=438164)
Wrong Name -
DerickClark - 18.05.2013
why are the names is wrong?
Example:
Test Has made Test1 Helper
i type /helpers
shows the name of wrong who set by.
Helpers Online:
Test
It need to be Test1
pawn Код:
CMD:helpers(playerid)
{
new Count;
new str[45];
new HelperName[MAX_PLAYER_NAME], id;
SendClientMessage(playerid, -1, "Helpers Online:");
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if (APlayerData[i][PlayerHelper])
{
GetPlayerName(id, HelperName, MAX_PLAYER_NAME);
Count ++;
format(str, sizeof str, "Helper %s",HelperName);
SendClientMessage(playerid, -1, str);
}
}
if(Count < 1) SendClientMessage(playerid, -1, "No Helpers Online!");
return 1;
}
Re: Wrong Name -
Mr.Valdez - 18.05.2013
does your script have a certain preference like on registration it requires FIRSTNAME_LASTNAME? because this could be disrupting it.
Re: Wrong Name -
DerickClark - 18.05.2013
No,it's not a rp server.
Re: Wrong Name -
CrystalMethod - 18.05.2013
Quote:
Originally Posted by DerickClark
No,it's not a rp server.
|
It doesn't matter if it's an RP server or not, people will still use RP names on non-rp servers.
I see it all the time.
Re: Wrong Name -
[KHK]Khalid - 19.05.2013
pawn Код:
GetPlayerName(id, HelperName, MAX_PLAYER_NAME);
Shouldn't you be getting the name of 'i' not 'id'?
pawn Код:
GetPlayerName(i, HelperName, sizeof HelperName);