Jump to content

Question

Posted (edited)

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

1 answer to this question

Recommended Posts

  • 0
Posted

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

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