Jump to content
  • 0

Ajutor in utilizarea sscanf pentru a formata un string


Question

Posted

Salut, as dori si eu o idee de cum as putea sa salvez un string care contine datele mdc ale unui jucator, de exemplu "first degree - reporter: gabi armed robbery - reporter: adrian cop attack - reporter: bank worker"

Cand se executa comanda /mdc as vrea sa manipulez acest string si sa afisez linie cu linie

"first degree - reporter: gabi"

"armed robbery - reporter: adrian" 

"cop attack - reporter: bank worker"

Ma gandesc ca s-ar putea atunci cand adaug crime in string sa le despart printr-un caracter special iar apoi sa detectez acest caracter cu sscanf dar nu stiu exact cum, sunt incepator.

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Tu vrei sa iti afiseze acel string asa fiecare pe un rand?, posteaza comanda si posteaza la ajutor scripting nu aici, 

Daca folosesti in textdraw sau in gametext, pentru ENTER este caracterul \n respectiv ~n~  daca este un mesaj pe chat, trebuie format pentru fiecare mesaj si trimis, apoi refacut mesajul si trimis iar

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
  • 0
Posted

Am spus si eu ca trebuie formatat dar cum iau dintr-un string asa lung partile care ma intereseaza pe rand? Nu am o comanda anume de aceea am postat aici.

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.