How would I check something with part of a name..
#1

I.e say I wanted to search a number.... How would I search the query in mysql with just part of their name.

I.e /findnumber Grant if any player in players had part of their name as grant how would I check this?

Or....

On a player login, how would I get their first name? i.e

Welcome to the server, Grant. and Not Grant McCaw?
Reply
#2

for splitting a players first name, you can try
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
new FirstName[MAX_PLAYER_NAME];
new LastName[MAX_PLAYER_NAME];
sscanf(PlayerName,"p<_>s["#MAX_PLAYER_NAME"]s["#MAX_PLAYER_NAME"]",FirstName,LastName);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)