Jump to content
  • 0

O intrebare



2 answers to this question

Recommended Posts

! schimba valoarea de adevar a unei expresii. Ex.: ( 4 > 2 ) este adevarata, iar !( 4 > 2 ) este falsa.

Singura valoare pe care strcmp o returneaza este 0, daca stringurile comparate sunt la fel.

Daca ai ! in fata, operatorul ignora comparatia si vei putea sa executi comanda chiar daca tastezi "/comanda2342324234sdfsd".

In al doilea exemplu, nu-ti va merge comanda pentru ca ai strcmp( cmd, "comanda" ) == true. strcmp nu returneaza valoarea 1, si va aparea Unknown command. if ( strcmp( cmd, "comanda", true ) == 0 ) { SetPlayerHealth( playerid, 0.0 ); } - Daca strcmp returneaza 0 omor jucatorul.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • 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.