View Single Post
  #16  
Old 08-14-2012, 11:51 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by clarke119 View Post
This is the involved parts - not the full script. This is the last attempt I made at trying to do this..

PHP Code:
function onActionServerside(){
 if(
params[0] == "rankchanger"){
    
temp.pl findplayerbycommunityname(params[1]);
    if (
pl != NULL){
        
rank pl.clientr.gangrank;
        
rights pl.clientr.gangrights;
 }
}
      else{
      
player.chat "Player not found.";
 }

Just realized that part. You mixed this
PHP Code:
rank pl.clientr.gangrank;
rights pl.clientr.gangrights
it should be

PHP Code:
pl.clientr.gangrank params[2];
pl.clientr.gangrights params[3]; 
Also you should find the player with findPlayer(acc); rather than using findPlayerByCommunityname(acc); since not everyone got a communityname. In the end it should look like:
PHP Code:
function onActionServerside(){
  if(
params[0] == "rankchanger"){
    
temp.pl findPlayer(params[1]);
    if (
temp.pl != NULL){
      
pl.clientr.gangrank params[2];
      
pl.clientr.gangrights params[3];
    }
    else {
      
player.chat "Player not found.";
    }
  }

__________________
MEEP!
Reply With Quote