Getting First Initials of a RP Name
#5

The c in the sscanf format represents a character.

You can make a two-dimensional array like this
pawn Код:
new pInitials[2][1] //two arrays - 1 cell each
Then use sscanf like Babul showed you to store the initials:
pawn Код:
sscanf( pName, "c'_'c", pInitials[ 0 ], pInitials[ 1 ]);
The sscanf line does this:

The string "name" is read by sscanf
The first character © it finds will be stored into pIntials[ 0 ].
Then it will search for the first underscore it finds
After it has done that, it will store the next character into pInitials[ 1 ]

This is the best way I can explain this - as I find it quite hard to explain correctly.
Reply


Messages In This Thread
Getting First Initials of a RP Name - by Ballu Miaa - 14.12.2012, 12:39
Re: Getting First Initials of a RP Name - by Babul - 14.12.2012, 12:57
Re: Getting First Initials of a RP Name - by Ballu Miaa - 14.12.2012, 12:59
Re: Getting First Initials of a RP Name - by ReneG - 14.12.2012, 13:23
Re: Getting First Initials of a RP Name - by LarzI - 14.12.2012, 13:26
Re: Getting First Initials of a RP Name - by Ballu Miaa - 14.12.2012, 16:05
Re: Getting First Initials of a RP Name - by Babul - 15.12.2012, 08:02
Re: Getting First Initials of a RP Name - by Ballu Miaa - 15.12.2012, 08:04

Forum Jump:


Users browsing this thread: 2 Guest(s)