Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: W3aPoN^ on Jul 27, 2016, 03:28 PM

Title: Level Problem!
Post by: W3aPoN^ on Jul 27, 2016, 03:28 PM
Hello Guys I Want To Make Player Levels In VCMP 0.4 Server How Can I Do It?
Title: Re: Level Problem!
Post by: vito on Jul 29, 2016, 01:30 PM
function onScriptLoad(){
  player_data_fill <- {"level" : 0;}; // usually for this vc-mp coders using "class" though
  player_data <- array(GetMaxPlayers(), player_data_fill);
}
function onPlayerJoin(player){
  player_data[player.ID].level = 1;
}
function onPlayerPart(player, reason){
  player_data[player.ID] = player_data_fill;
}
Title: Re: Level Problem!
Post by: MatheuS on Jul 29, 2016, 02:49 PM
this guy has not learned to use the forum and is posting in all the wrong places. ???
Title: Re: Level Problem!
Post by: Kewun on Jul 29, 2016, 03:00 PM
i told this nab to not usebig letters but he did it yet again and posted in wrong sections, go make it your self for atleast once
Title: Re: Level Problem!
Post by: KAKAN on Jul 29, 2016, 04:15 PM
@vito, due to some problems, your code won't work. You can try it yourself though, the last time I tried it, it didn't work.
Title: Re: Level Problem!
Post by: vito on Jul 29, 2016, 04:35 PM
Quote from: KAKAN on Jul 29, 2016, 04:15 PM@vito, due to some problems, your code won't work. You can try it yourself though, the last time I tried it, it didn't work.
I forgot the syntax, sorry it was untested. ( ; after 0 - gets that error)

Correct one:
function onScriptLoad(){
  player_data_fill <- {
    "level" : 0
  }; // usually for this vc-mp coders using "class" though
  player_data <- array(GetMaxPlayers(), player_data_fill);
}
function onPlayerJoin(player){
  player_data[player.ID].level = 1;
}
function onPlayerPart(player, reason){
  player_data[player.ID] = player_data_fill;
}
Title: Re: Level Problem!
Post by: KAKAN on Jul 29, 2016, 05:15 PM
Instead, why not use a class?
" usually for this vc-mp coders using "class" though" I can't understand that :(
Title: Re: Level Problem!
Post by: vito on Jul 29, 2016, 06:43 PM
Quote from: KAKAN on Jul 29, 2016, 05:15 PMInstead, why not use a class?
" usually for this vc-mp coders using "class" though" I can't understand that :(
I don't like to use classes to as table.  If even no methods used there, why it should be class? It's just a table to store player's data.
Title: Re: Level Problem!
Post by: W3aPoN^ on Jul 30, 2016, 10:01 AM
Ok Thanks I used Fuzzie System v3 But It's Not Working Can You Tell Me? What Can I Do Brothers I Am A New Member In This Forum But I Created Some My Scripts But Dont Want To upload Them To Forum Thanks My Problem Tell Me What Can I DO?