Szerző Téma: Valaki tudna egy ilyen scriptet adni ami ezt tartalmazná? ( /b OOC chat /k IC )  (Megtekintve 2188 alkalommal)

Winedrinker112

  • Vendég
0 Show voters
Sziasztok!
Valaki tudna nekem küldeni
vagy feltenni valahová egy
olyan scriptet ami tartalmaz
egy OOC chatet /b-t
egy IC chatet pl /k
?
Kerestem de nem találtam :/ :no:

Nem elérhető skyLine

  • Globális moderátor
  • 2171
  • 2020
  • Vaterán
    • Profil megtekintése
Valaki tudna egy ilyen scriptet adni ami ezt tartalmazná? ( /b OOC chat /k IC )
« Válasz #1 Dátum: 2012. február 19. - 11:35:50 »
0 Show voters
Leszedsz egy RP módot és kiszeded belõle a /b parancsot ;) A /k parancs is hasonló :P
 
   if(strcmp(cmd, \"/b\", true) == 0)//local ooc
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, \"   Nem vagy bejelentkezve !\");
            return 1;
        }
   GetPlayerName(playerid, sendername, sizeof(sendername));
   new length = strlen(cmdtext);
   while ((idx < length) && (cmdtext[idx] <= \' \'))
   {
      idx++;
   }
   new offset = idx;
   new result[64];
   while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
   {
      result[idx - offset] = cmdtext[idx];
      idx++;
   }
   result[idx - offset] = EOS;
   if(!strlen(result))
   {
      SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /b [szöveg]\");
      return 1;
   }
   format(string, sizeof(string), \"%s NonRP: (( %s ))\", sendername, result);
   ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
   printf(\"%s\", string);
}
return 1;
}

 
Kiszedtem egy RP módból a színeket írd át a tiedre, mert valószínû, hogy nem lesznek Definálva, de lehet, hogy tévedek :)
/k :
 

if(strcmp(cmd, \"/k\", true) == 0)//local say
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, \"   Nem vagy bejelentkezve !\");
            return 1;
        }
   GetPlayerName(playerid, sendername, sizeof(sendername));
   new length = strlen(cmdtext);
   while ((idx < length) && (cmdtext[idx] <= \' \'))
   {
      idx++;
   }
   new offset = idx;
   new result[64];
   while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
   {
      result[idx - offset] = cmdtext[idx];
      idx++;
   }
   result[idx - offset] = EOS;
   if(!strlen(result))
   {
      SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /k [szöveg]\");
      return 1;
   }
   format(string, sizeof(string), \"%s mondja: %s\", sendername, result);
   ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
   printf(\"%s\", string);
}
return 1;
}

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Valaki tudna egy ilyen scriptet adni ami ezt tartalmazná? ( /b OOC chat /k IC )
« Válasz #2 Dátum: 2012. február 19. - 11:57:31 »
0 Show voters
Idézetet írta: Skyline date=1329647750\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"17241\" data-ipsquote-contentclass=\"forums_Topic
Leszedsz egy RP módot és kiszeded belõle a /b parancsot ;) A /k parancs is hasonló :P
 
   if(strcmp(cmd, \"/b\", true) == 0)//local ooc
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, \"   Nem vagy bejelentkezve !\");
            return 1;
        }
   GetPlayerName(playerid, sendername, sizeof(sendername));
   new length = strlen(cmdtext);
   while ((idx < length) && (cmdtext[idx] <= \' \'))
   {
      idx++;
   }
   new offset = idx;
   new result[64];
   while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
   {
      result[idx - offset] = cmdtext[idx];
      idx++;
   }
   result[idx - offset] = EOS;
   if(!strlen(result))
   {
      SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /b [szöveg]\");
      return 1;
   }
   format(string, sizeof(string), \"%s NonRP: (( %s ))\", sendername, result);
   ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
   printf(\"%s\", string);
}
return 1;
}

 
Kiszedtem egy RP módból a színeket írd át a tiedre, mert valószínû, hogy nem lesznek Definálva, de lehet, hogy tévedek :)
/k :
 

if(strcmp(cmd, \"/k\", true) == 0)//local say
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, \"   Nem vagy bejelentkezve !\");
            return 1;
        }
   GetPlayerName(playerid, sendername, sizeof(sendername));
   new length = strlen(cmdtext);
   while ((idx < length) && (cmdtext[idx] <= \' \'))
   {
      idx++;
   }
   new offset = idx;
   new result[64];
   while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
   {
      result[idx - offset] = cmdtext[idx];
      idx++;
   }
   result[idx - offset] = EOS;
   if(!strlen(result))
   {
      SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /k [szöveg]\");
      return 1;
   }
   format(string, sizeof(string), \"%s mondja: %s\", sendername, result);
   ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
   printf(\"%s\", string);
}
return 1;
}

 

Erre hibákat fog írni.
ZCMD-be jó?

Winedrinker112

  • Vendég
Valaki tudna egy ilyen scriptet adni ami ezt tartalmazná? ( /b OOC chat /k IC )
« Válasz #3 Dátum: 2012. február 19. - 12:00:47 »
0 Show voters
igen tökéletes!
csak egy /b meg egy /k parancs

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Valaki tudna egy ilyen scriptet adni ami ezt tartalmazná? ( /b OOC chat /k IC )
« Válasz #4 Dátum: 2012. február 19. - 13:26:52 »
0 Show voters
#include a_samp
#include zcmd
#include sscanf
CMD:b(playerid,params[])
{
new szoveg[120];
if(sscanf(params,\"s\",szoveg)) return SendClientMessage(playerid, 0x0ffff, \"/b szöveg\");
new string[128];
GetPlayerName(playerid,string,24);
format(string,128,\"(( %s mondja: %s ))\",string,szoveg);
SendClientMessageToAll(0x0ffff,string);
return 1;
}
CMD:k(playerid,params[])
{
new szoveg[120];
if(sscanf(params,\"s\",szoveg)) return SendClientMessage(playerid, 0x0ffff, \"/k szöveg\");
new string[128];
GetPlayerName(playerid,string,24);
format(string,128,\"%s mondja: %s\",string,szoveg);
SendClientMessageToAll(0x0ffff,string);
return 1;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal