Thread: Clientr.PROBLEM
View Single Post
  #2  
Old 10-10-2007, 07:32 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Switch View Post
PHP Code:
function onActionServerSide() {
  
with (findplayer(params[0])) {
    
clientr.mud_nation "Neutral";
  }
}
//#CLIENTSIDE
function onPlayerEnters() {
  if (
clientr.mud_nation == NULL) {
    
triggerserver("gui",this.name,player.account);
  }

Although your method works perfectly fine, that way isn't the best way to go about doing this.

There are a few problems I see right off the bat:
1) For this sort of situation, it is better to use the Control-NPC.
2) That way you have it set up isn't totally secure. (People could potentially reset the nation of other players). You do not need to pass player.account and have it find the player again serverside.
3) You only have to check for the condition when the weapon is created, and not every time a player enters a level.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote