Jump to content
MakeWebGames

Attack Enemy race only?


zefiux

Recommended Posts

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}
Link to comment
Share on other sites

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...