2 Questions with this command.
#8

Your code is a horrible mess. Furthermore, you don't need an IPC check, the player is connected to have used the command.

pawn Код:
COMMAND:clantag(playerid, params[]) { // If you're using zcmd, you don't need 'cmdtext[]'
    if(!isnull(params)) {
        // The command contains a string that we can parse just by 'params'
        new
            playerClanTagandName[MAX_PLAYER_NAME], // For formatting the new player name
            playerName[MAX_PLAYER_NAME]; // Use the define/constant. It's 24, not 256.

        GetPlayerName(playerid, playerName, MAX_PLAYER_NAME); // Getting the players name.
       
        format(playerClanTagandName, MAX_PLAYER_NAME, "[%s]%s", params, playerName); // Formatting
        SetPlayerName(playerid, playerClanTagandName); // Setting the new name
    }
}
I assume that's what you originally wanted, it'd get the old name, put the clan tag in front, then change their name to it.
Reply


Messages In This Thread
2 Questions with this command. - by Marshall_Banks - 26.10.2010, 02:28
Re: 2 Questions with this command. - by Haydz - 26.10.2010, 02:36
Re: 2 Questions with this command. - by Marshall_Banks - 26.10.2010, 02:42
Re: 2 Questions with this command. - by Scenario - 26.10.2010, 02:50
Re: 2 Questions with this command. - by Marshall_Banks - 26.10.2010, 03:15
Re: 2 Questions with this command. - by Scenario - 26.10.2010, 03:17
Re: 2 Questions with this command. - by Crayon - 26.10.2010, 03:18
Re: 2 Questions with this command. - by Calgon - 26.10.2010, 04:02

Forum Jump:


Users browsing this thread: 2 Guest(s)