Szerző Téma: Ezt hogy? "Nem található ilyen parancs a szerveren"  (Megtekintve 851 alkalommal)

Ezt hogy? "Nem található ilyen parancs a szerveren"
« Dátum: 2012. június 26. - 16:43:22 »
0 Show voters
Hogyan kell megoladni,ha pl beír egy nem létezõ parancsot a player,nem azt írja,hogy \"unknown command\" hanem pl kiírja hogy nem található parancs.../cmds...

Ezt hogy? "Nem található ilyen parancs a szerveren"
« Válasz #1 Dátum: 2012. június 26. - 16:58:48 »
0 Show voters
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
new strin[128];
format(strin, sizeof(strin), \"HIBA: %s parancs nem létezik! Próbáld a /civilhelp parancsot.\", cmdtext);
SendClientMessage(playerid,hiba, strin);
}
return 1;
}

Ezt hogy? "Nem található ilyen parancs a szerveren"
« Válasz #2 Dátum: 2012. június 26. - 17:00:36 »
0 Show voters
Idézetet írta: Yakuza™ date=1340722728\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"23395\" data-ipsquote-contentclass=\"forums_Topic

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
new strin[128];
format(strin, sizeof(strin), \"HIBA: %s parancs nem létezik! Próbáld a /civilhelp parancsot.\", cmdtext);
SendClientMessage(playerid,hiba, strin);
}
return 1;
}

 

Ez csak akkor jó ha zcmd-t használsz.

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Ezt hogy? "Nem található ilyen parancs a szerveren"
« Válasz #3 Dátum: 2012. június 26. - 17:07:04 »
0 Show voters
strcmpnél:
 
public OnPlayerCommandText(playerid,cmdtext[])
{
     //parancsok
     return SendClientMessage(playerid,0x0ffff,\"Nincs ilyen parancs.\");
}

Ezt hogy? "Nem található ilyen parancs a szerveren"
« Válasz #4 Dátum: 2012. június 27. - 16:16:28 »
0 Show voters
Idézetet írta: Benceee date=1340723224\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"23395\" data-ipsquote-contentclass=\"forums_Topic
strcmpnél:
 
public OnPlayerCommandText(playerid,cmdtext[])
{
     //parancsok
     return SendClientMessage(playerid,0x0ffff,\"Nincs ilyen parancs.\");
}

 

Köszönöm neked,hogy nem csak a zcmd-set írtad le :)
ZÁROK

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal