DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • September 05, 2010, 07:56:49 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Help Please..  (Read 1070 times)
0 Members and 1 Guest are viewing this topic.
Sanctum
Guest
« on: November 23, 2005, 09:26:04 PM »

Well what I'm making is a mod that lets you either help the newest player, or knock them down and laugh at them.. the chance to help them/hurt them only shows up randomly.. but the problem I have is that I don't want someone who is the latest helper/hurter(even a word?) to be able to see that..heres the code I have:
Code:
if((e_rand(1,5)==4 AND $settings['nphelp']!=$myname) || (e_rand(1,5)==4 AND $settings['npdown']!=$myname)){
output("<a href=village.php?op=helpnew>Help Them</a><br>",true);
output("<a href=village.php?op=knockdown>Knock Them Down and Laugh at Him</a>",true);
addnav("","village.php?op=helpnew");
addnav("","village.php?op=knockdown");
}
but the people who just helped/hurt the newest player can still see the options to help them/hurt them..

Note: I will be converting this to 1.0.5 once I get my new server set up..within the next week hopefully.. I just want to get this working now so I can have it ready to be converted when I upgrade my site.
« Last Edit: November 23, 2005, 09:35:20 PM by Sanctum » Logged
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #1 on: November 23, 2005, 11:04:27 PM »

Well I can't tell from just this amount of code....

But you should be setting npdown to the last player hurt I figure from reading this and nphelp from the last player who helped/hurt the other. This needs to be set when the action is run and then when you do the check it should not show the options if it is their name.

Now the other option is to create a field for the user that last helped/hurt someone and just do a check on newday for it...Then reset it.
« Last Edit: November 23, 2005, 11:06:26 PM by Arune » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
32 Guests, 6 Users
KaosKaizer, Daolin, Adept, JollyGG, Oak, Cory2
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search