Search for capital letters - 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: Search for capital letters (
/showthread.php?tid=168473)
Search for capital letters -
Robx - 16.08.2010
Hi,
I have a question..
when a player connects i want to check his name, is it RP Name_Surname, i made checker but only with '_' and now i want to check for Capital letters
Re: Search for capital letters -
Robx - 16.08.2010
Refresh! Bump!
Anyone help?
Re: Search for capital letters -
DRIFT_HUNTER - 16.08.2010
download some RP gm and see how its there
Re: Search for capital letters -
RyDeR` - 16.08.2010
It's better to automaticly change it if there are no capital letters.
Example:
pawn Код:
new
pName[20] = "name_surename", // you need to do GetPlayerName I just assigned something, don't forget.
name[2][20]
;
strmid(name[0], pName, 0, strfind(pName, "_"));
strmid(name[1], pName, strfind(pName, "_") + 1, strlen(pName));
for(new x; x != sizeof(name); x++) name[x][0] = toupper(name[x][0]);
// printf("%s_%s", name[0], name[1]);
Alright, let's say name_surename is our input. This code above will automaticly change the first letter before '_' and after to a capital letter.
I didn't do something if the strfind function return -1 because I read you did a RP name check so, that's all OK.
Respuesta: Search for capital letters -
Yue Rexie - 22.11.2011
thanks RyDeR!!