Jump to content
  • 0

intrebare


Anexy

Question

4 answers to this question

Recommended Posts

  • 0
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.

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.