View Single Post
  #3  
Old 07-03-2010, 10:22 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Your initial suggestion is very redundant and a waste of clientr variable, and the method of finding the player dates back to the GS1 days.

Here's how it's done now, or at least how I do it.

PHP Code:
function onActionServerSide() {
  if (
params[0] == "getprofile") {
    
// Find Player Object
    
with (findplayer(params[0])) {
      
// Store Data into Temporary Variable
      
temp.data = {
        
player.accountplayer.communitynameplayer.upgradestatusclientr.somethingelseofinterest
      
};
    }
    
// Send Temporary Data back to Client
    
player.triggerclient(this.name"profiledata"temp.data);
  }
}

//#CLIENTSIDE

function onMouseDown(button) {
  if (
button == "right") {
    
temp.pid testplayer(mousexmousey);
    if (
temp.pid 0) {
      
getPlayerData(players[temp.pid].account);
    }
  }
}

function 
getPlayerData(acct) {
  
// Request Player Profile Data
  
triggerserver("gui"name"getprofile"acct);
}

function 
onActionClientSide() {
  if (
params[0] == "profiledata") {
    
temp.profiledata params[1];
    
// Data Handling Code Here
  
}

__________________
Quote:

Last edited by fowlplay4; 07-03-2010 at 10:32 PM..
Reply With Quote