Jump to content
  • 0

Unknow Kommand


filiblox

Question

Am o problema , am facut un mic game mode si atunci cand dau spre exemplu /comenzi imi apare lista de comenzi dar si unknow comand :| nu inteleg de ce . Is inecepator in script si poate ma ajutati .

Cum am eu comanda : 

if (strcmp("/aa", cmdtext, true, 6) == 0)

{

SendClientMessage(playerid, COLOR_YELLOW , "Ai fost teleportat la Aeroportul Abandonat");

SetPlayerPos(playerid,403.1577,2457.5720,16.5000);

}

Posibil sa nu stiu cum sa scriu scriptul in GameMode ... Cine stie are o bere .

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Guest PlayON

Nu returnezi valoarea de adevar, daca este adevarat sau fals.

_______________________________________

if ( !strcmp( cmdtext, "/aa" ) )

{

    SendClientMessage(playerid, COLOR_YELLOW , "Ai fost teleportat la Aeroportul Abandonat");

    SetPlayerPos(playerid,403.1577,2457.5720,16.5000);

    return 1; //Comanda procesata cu succes, i spunem serverului ca comanda a fost executat cu succes si ca ea exista.      Daca punem return 0; comanda v-a fi procesata dar i va spune serverului ca comanda nu exista desi a fost procesata.      Daca nu punem fara return, este la fel ca return 0;

}

Link to comment
Share on other sites

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