Jump to content
MakeWebGames

Recommended Posts

Posted

I'm using ezRPG engine... And well every player has it owns race.. "Fire Clan" or "Ice Clan"

Problem is I don't know how to make "Fire Clan" able to see only "Ice Clan" ...

here is code of attack screen

 

{include file="header.tpl" TITLE="Attacking"}

<p>
Click on an opponent to attack them!
</p>

<table width="90%">
 <tr>
   <th style="text-align: left;">Name</th>
   <th style="text-align: left;">Level</th>
 </tr>


{foreach from=$weaker item=weaker}
 <tr>
   <td><a href="index.php?mod=Attack&act=go&id={$weaker->id}">{$weaker->username}</a></td>
   <td>{$weaker->level}</td>
 </tr>
{/foreach}


</table>

{include file="footer.tpl"}

 

I think I've to do something with

{foreach from=$weaker item=weaker}
 <tr>
   <td><a href="index.php?mod=Attack&act=go&id={$weaker->id}">{$weaker->username}</a></td>
   <td>{$weaker->level}</td>
 </tr>
{/foreach}

 

I've tryed using {if} function, but failed, might be just me noob :/

 

{if $player->race == 'Fire Clan'}
*Ice Clan list*

{else}
{if $player->race == 'Ice Clan'}
*Fire Clan List*
{else}
{/if}
{/if}
Posted
Why are you trying to perform logic in the template?

Do your logic in code where it belongs; pass the resulting

data onto the template.

Octarine some times you sound like a robot lol try using plain english ;)

Some members and cant relate to what your telling them :)

Posted
Octarine some times you sound like a robot lol try using plain english ;)

Some members and cant relate to what your telling them :)

It's plain English. :confused:

Though, in translation it sounds very posh. Actually, very proper usage of the language.

Posted

You can only congratulate someone for using the language properly, some around here could take an example of it. At least it's understandable and readable.

Now back on topic :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...