Jump to content

Question

Posted

cum pot face cand un jucator atinge numarul de rp-uri pentru urmatorul nivel  sa iti dea level up fara sa mai dai /buylevel

Spoiler

 

 

4 answers to this question

Recommended Posts

  • 0
Posted

Cand ii dai rp-uri verifica daca are destule pentru level up si schimba-i levelul si poate da-i un mesaj

  • 0
Posted
On 4/11/2020 at 12:49 AM, CTMBeast said:

Cand ii dai rp-uri verifica daca are destule pentru level up si schimba-i levelul si poate da-i un mesaj

imi poti explica te rog cum fac asta?

Spoiler

 

 

  • 0
Posted
Acum 27 minute, Anexy a spus:

imi poti explica te rog cum fac asta?

Poti pune intr-un timer o data/secunda sau nu stiu, o data la 10 secunde... o data pe minut, cum vrei tu, cu foreach sa verifice daca jucatorul are destule rp pentru level up si sa ii dea level up. 

Exemplu:

foreach(new i: Player)
{
  if(PlayerInfo[i][pRP] == PlayerInfo[i][pRPNecesar])
  {
 	 PlayerInfo[i][pLevel] ++;
	//aici mai pui ce completari vrei tu, inlocuiesti cu ce variabile ai tu in gamemode.
  }
}

Nu am scriptat pe gamemode rpg de multa vreme, nu mai stiu exact cum se numesc variabilele :)) Pe langa asta, difera de la server la server. Inlocuieste cu ce ai tu si cu ce verificari mai vrei, mai sus ai un exemplu teoretic. Sper ca ai inteles.

  • 0
Posted
33 minutes ago, BaFFyJunior said:

Poti pune intr-un timer o data/secunda sau nu stiu, o data la 10 secunde... o data pe minut, cum vrei tu, cu foreach sa verifice daca jucatorul are destule rp pentru level up si sa ii dea level up. 

Exemplu:


foreach(new i: Player)
{
  if(PlayerInfo[i][pRP] == PlayerInfo[i][pRPNecesar])
  {
 	 PlayerInfo[i][pLevel] ++;
	//aici mai pui ce completari vrei tu, inlocuiesti cu ce variabile ai tu in gamemode.
  }
}

Nu am scriptat pe gamemode rpg de multa vreme, nu mai stiu exact cum se numesc variabilele :)) Pe langa asta, difera de la server la server. Inlocuieste cu ce ai tu si cu ce verificari mai vrei, mai sus ai un exemplu teoretic. Sper ca ai inteles.

Nu cred ca e o optiune buna ca o sa iti manance din resurse foarte mult..

 

Verifica cand se adauga la variabila ( de ex la Payday, sistemul de realizari daca ai, etc.. ) si fa o verificare acolo cu un if.. de ex:

PlayerInfo[playeird][pRP] += 1;
if(PlayerInfo[playerid][pRP] == destulerp) {
	PlayerInfo[playerid][pLevel] += 1;
	SendClientMessage(playerid, -1, "Level up! Felicitari");
}

In loc de destulerp trebuie sa vezi tu cum e sistemul la tine pe gm.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.