Remote the _ From a roleplay name and send the firstname to chat only!
#10

Never mind, I managed to do it:
Код:
 stock returnFirstName(playerid)
{
    new name[MAX_PLAYER_NAME+1];
    GetPlayerName(playerid, name, sizeof(name));
    //
    new namestring = strfind(name, "_", true);
    if(namestring == -1)
    {
   		return name;
    }
	//
	
    new pos = strfind(name, "_");

    if(pos != -1) {
        strdel(name, pos, strlen(name));
        return name;
    }

    else {
        name = "NULL";
    }
    return name;
}
Thanks for all your help =]
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)