1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  3. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Prefixed names?

Discussion in 'Help' started by invadingaliens, Apr 25, 2013.

  1. Hey guys, It's me. I'm sort of stuck.

    I've been trying to create something that adds a prefix to the name of a character in a certain faction.
    I'm sort of stuck here. Anyone that can help?
    E.G.
    James Green becomes Apprentice James Green
    This is how far I got.

    function FACTION:GetName(player, character)
    return "Apprentice".. ;
     
  2. Look into my Nicknames plugin and you should get a general idea.
     
  3. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    Here you go pal, this should be what you're looking for.

    Code:
    FACTION.myPrefix = "Apprentice. ";
    
    -- Called when a player's name should be assigned for the faction.
    function FACTION:GetName(player, info, data)
    	if (self.useFullName) then
    		return self.myPrefix..data.fullName;
    	else
    		return self.myPrefix..data.forename.." "..data.surname;
    	end;
    end;
    
     

Previous Readers (Total: 0)