Jump to content
  • 0

Problema top


1Shot

Question

Salut. Cum as putea sa fac un script care sa-mi arate Jucatorul cu cea mai mare variabila, gen Damage[playerid]; Si sa imi arate jucatorul care are cea mai mare valoare la Damage[playerid]; Atat, doar primul, cel mai mare. (Fara mysql, doar variabila temporara)

Ma poate ajuta cineva? multumesc

Edited by 1Shot
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Salut, vei crea un for pentru playeri cu i sa zicem si o variabila cu valoarea default 0 new variabila=0; inaintea acestuia, apoi un if simplu: if( damage [   i  ]  >= damage[variabila] ) variabila = i;

Si gata, idul jucatorui va fi stocat in variabila

Problema este daca scorul mai multor jucatori este egal il va lua pe cel care are idul mai mare, depinde si cum incepi forul

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
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.