SA-MP Forums Archive
Storing 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: Storing name. (/showthread.php?tid=100975)



Storing name. - TheFailFactor - 07.10.2009

Hey there.

I need to storage a name of a player somehow, and then set it back at a certain time. How to?


Re: Storing name. - Correlli - 07.10.2009

pawn Code:
new PlayerName[MAX_PLAYER_NAME], PlayerString[MAX_PLAYERS][MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(PlayerString[playerid], sizeof(PlayerString), "%s", PlayerName);
This will store player's name for every player you use.

Once you have stored it, you can use it (example):
pawn Code:
SetPlayerName(playerid, PlayerString[playerid]);