Szerző Téma: Parancs - Chat  (Megtekintve 466 alkalommal)

Nem elérhető Petrik

  • 318
    • Profil megtekintése
Parancs - Chat
« Dátum: 2012. Október 29. - 15:26:30 »
0 Show voters
Sziasztok.
Azt meglehet oldani, ha beír valamit a játékos, akkor kiírja? Izé... Nem tudom, hogy elmondani.
Szóval:
Ha beír a játékos valamit, akkor küldje a chatbe mindenkinek úgy, mintha nem is parancsot írt volna be, hanem csak T-be (chatbe) írt egy üzenetet...
Mondjuk beírja a chatbe Józsika, hogy: /uzenet

Akkor kiírja: Józsika says: Szeretem a sajtot



Szóval, mintha nem is parancsot írt volna be, hanem csak ír valamit a chatbe. Érthetõ? Ha nem, akkor megpróbálom újra leírni  :wall:
« Utoljára szerkesztve: 2012. Október 29. - 15:28:31 írta Petrik »

Nem elérhető Casamiro

  • 1046
    • Profil megtekintése
Parancs - Chat
« Válasz #1 Dátum: 2012. Október 29. - 15:29:30 »
+1 Show voters
CMD:uzenet(playerid, params[]) return CallLocalFunction(\"OnPlayerText\", \"ds\", playerid, \"Szeretem a sajtot\");

Parancs - Chat
« Válasz #2 Dátum: 2012. Október 29. - 15:30:05 »
0 Show voters
Erre gondoltál?
 
COMMAND:me(playerid,params[])
{
// Setup local variables
new Msg[128], Message[128], Name[24];
// Send the command to all admins so they can see it
SendAdminText(playerid, \"/me\", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, \"s[128]\", Message)) SendClientMessage(playerid, 0xFF0000AA, \"Usage: \\\"/me <action>\\\"\");
else
{
    // Check if the player isn\'t muted
    if (APlayerData[playerid][Muted] == false)
    {
      GetPlayerName(playerid, Name, sizeof(Name));
      format(Msg, sizeof(Msg), \"* %s: %s\", Name, Message);
      SendClientMessageToAll(0xFFFF00AA, Msg);
   }
   else
       SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}El vagy némítva.\");
}
}
else
    return 0;
// Let the server know that this was a valid command
return 1;
}

 
Itt beírja, hogy /me Szeretem a sajtot és chatban kiírja hogy pl: Józsi: Szeretem a sajtot

Nem elérhető Petrik

  • 318
    • Profil megtekintése
Parancs - Chat
« Válasz #3 Dátum: 2012. Október 29. - 16:32:06 »
0 Show voters
Idézetet írta: Casamiro date=1351520970\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"29199\" data-ipsquote-contentclass=\"forums_Topic

CMD:uzenet(playerid, params[]) return CallLocalFunction(\"OnPlayerText\", \"ds\", playerid, \"Szeretem a sajtot\");

 

Köszönöm, erre gondoltam :D

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal