Show Class in User profile

General Chat, Comments
Post Reply
cyborg
Posts: 38
Joined: Mon Feb 03, 2014 11:09 am

Show Class in User profile

Post by cyborg »

I'm trying add the players class in the user profile, at the moment i just get the number, how do I link value to user_class.id?

this is my code so far

Code: Select all

	// adds players class
	$result = $db->Execute("select variable_id,value from user_variables where variable_id = 12 and user_id = ?", $_GET["id"]);
       if ($result->EOF)
        echo "<td>" . Translate("None Selected") . "</td></tr>";
    else
        echo "<tr><td width='1%'><b>" . str_replace(" ", " ", Translate("Class")) . ":</b></td>";
        echo "<td>{$result->fields[1]}</td></tr>";
    $result->Close();
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Show Class in User profile

Post by a_bertrand »

Check out the user_class table (as defined in the player_class module). That should give you the info you are lacking.
Creator of Dot World Maker
Mad programmer and annoying composer
cyborg
Posts: 38
Joined: Mon Feb 03, 2014 11:09 am

Re: Show Class in User profile

Post by cyborg »

Thanks I think I got it working finally :)
Post Reply

Return to “General”