SA-MP Forums Archive
How to get letters/numbers of the name/ip - 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: How to get letters/numbers of the name/ip (/showthread.php?tid=92359)



How to get letters/numbers of the name/ip - Khelif - 19.08.2009

Hello
how to get first 4-6 letters/numbers of the name/ip from .txt file. Ive tryed something like this, but it gets me 4 last letters of the name:
Код:
if(strfind(dini_Get("Names.txt", PlayerName[4])
please opinions


Re: How to get letters/numbers of the name/ip - James_Alex - 19.08.2009

try this
pawn Код:
new letters[4], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
strmid(letters, dini_Get("Names.txt", PlayerName), 0, strlen(dini_Get("Names.txt", PlayerName)), 255);