21.09.2009, 23:23
I'm making a system where when a player connects, that players name, specifically the first name, is retrieved. It is then used to load some shit, like that player's info. However, I dont want to have to specify EVERY letter. For example,
Cept not have to type EVERY letter. Any help?
pawn Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME],firstletter[2];
GetPlayerName(playerid,name,sizeof(name));
strmid(firstletter,name,0,1,sizeof(firstletter));
switch(firstletter[0])
{
case 'a', 'A', 'b', 'B': print("example")
case 'c', 'C', 'd', 'D': print("well, yeah")
}
return 1;
}