[Pomoc]Uvezi više komandi

Započeo Danny Williams, Januar 07, 2012, 14:54:41 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:NX
Detaljan opis problema:Trebaloi bi uraditi sljedeće komande
Dio skripte:Komandu /heo treba da zagrada pocetna bude u ovoj boji kao Å¡ta je head Admin
COMMAND:heo(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new idx;
   if(IsPlayerConnected(playerid))
   {
       if(PlayerInfo[playerid][pAdmin] < 1338)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Nisi ovlasten! !");
           return 1;
       }
 if(PlayerInfo[playerid][pMuted] == 1)
{
format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /heo [Head Admin ooc chat]");
return 1;
}
format(string, sizeof(string), "(({00F2FF}Head Admin %s: {FFFFFF}%s {00F2FF}))", sendername, result);
OOCOff(0x0075B0FF,string);
printf("%s", string);
}
return 1;
}


Komanda /gmo znači da bude GameMaster u zelenoj boji a ime u zelenoj i text u bijeloj boji a zagrade isto u zelenoj boji

COMMAND:gmo(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new idx;
   if(IsPlayerConnected(playerid))
   {
       if(PlayerInfo[playerid][pGameMaster] < 1)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Nisi ovlasten! !");
           return 1;
       }
 if(PlayerInfo[playerid][pMuted] == 1)
{
format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} (/gmo)oc [GameMaster ooc chat]");
return 1;
}
format(string, sizeof(string), "(({00FF15}GameMaster %s: {FFFFFF}%s {00FF15}))", sendername, result);
OOCOff(0x0075B0FF,string);
printf("%s", string);
}
return 1;
}


Komanda /report kada netko nešta pošalje na /report da stigne i ID igrača:
COMMAND:report(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new idx;
   if(IsPlayerConnected(playerid))
   {

       GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /report [text]");
return 1;
}
if(Reporter[playerid] == 1)
{
           SendClientMessage(playerid, COLOR_GREY, "Moras sacekati minutu prije ponovnog slanja reporta.");
    return 1;
}
 if(PlayerInfo[playerid][pMuted] >= 1)
{
format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
format(string, sizeof(string), "Report od %s: {B1B1D8}*%s", sendername, (result));
ABroadCast(0x8080C0FF,string,1);
format(string, sizeof(string), "|Tvoj report glasi: {B1B1D8}*%s",  (result));
SendClientMessage(playerid, 0x8080C0FF, string);
Reporter[playerid] = 1;
SetTimerEx("Report1",60000, false, "i", playerid);

    }
   return 1;
}


Komanda /pomoc isto tako da stiže ID
COMMAND:pomoc(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new idx;
   if(IsPlayerConnected(playerid))
   {

       GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /pomoc [text]");
return 1;
}
if(Pomoc1[playerid] == 1)
{
   SendClientMessage(playerid, COLOR_GREY, "Moras sacekati minutu prije ponovnog slanja prijave.");
return 1;
}
 if(PlayerInfo[playerid][pMuted] == 1)
{
format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
format(string, sizeof(string), "Pomoc od %s: {BBDCED}*%s", sendername, (result));
GBroadCast(0x61AFD7FF,string,1);
ABroadCast(0x61AFD7FF,string,1);
format(string, sizeof(string), "|Vasa prijava glasi:{BBDCED} *%s", (result));
           SendClientMessage(playerid, 0x3499CCFF, string);
           Pomoc1[playerid] = 1;
SetTimerEx("Pomoc",60000, false, "i", playerid);

}
   return 1;
}


Komanda /gamemasteri da bude GameMaster i lvl gamemastera u zelenoj a ime u bijeloj i koji je nivo gm-a
COMMAND:gamemasteri(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
       if(IsPlayerConnected(playerid))
   {
SendClientMessage(playerid, 0x416EFFC6, "{80BFFF}_______________GameMasteri_______________");
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
   if(PlayerInfo[i][pGameMaster] >= 1)
   {
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "{00FF15}GameMaster:(FFFFFF)%s|(00FF15)Lvl:(FFFFFF)%d ", sendername, PlayerInfo[i][pGameMaster]);
SendClientMessage(playerid, COLOR_WHITE, string);

}
}
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Poslednja Izmena: Januar 07, 2012, 14:54:56 POSLE PODNE od Danny Williams

COMMAND:heo(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new idx;
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] < 1338)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi ovlasten! !");
            return 1;
        }
  if(PlayerInfo[playerid][pMuted] == 1)
{
format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /heo [Head Admin ooc chat]");
return 1;
}
format(string, sizeof(string), "{00F2FF}(( Head Admin %s: {FFFFFF}%s {00F2FF}))", sendername, result);
OOCOff(0x0075B0FF,string);
printf("%s", string);
}
return 1;
}



COMMAND:gmo(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new idx;
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pGameMaster] < 1)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi ovlasten! !");
            return 1;
        }
  if(PlayerInfo[playerid][pMuted] == 1)
{
format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} (/gmo)oc [GameMaster ooc chat]");
return 1;
}
format(string, sizeof(string), "{00FF15}(( GameMaster %s: {FFFFFF}%s {00FF15}))", sendername, result);
OOCOff(0x0075B0FF,string);
printf("%s", string);
}
return 1;
}



COMMAND:report(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new idx;
    if(IsPlayerConnected(playerid))
    {

        GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /report [text]");
return 1;
}
if(Reporter[playerid] == 1)
{
            SendClientMessage(playerid, COLOR_GREY, "Moras sacekati minutu prije ponovnog slanja reporta.");
    return 1;
}
  if(PlayerInfo[playerid][pMuted] >= 1)
{
format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
format(string, sizeof(string), "Report od %s[%d]: {B1B1D8}*%s", sendername,  playerid, (result));
ABroadCast(0x8080C0FF,string,1);
format(string, sizeof(string), "|Tvoj report glasi: {B1B1D8}*%s",  (result));
SendClientMessage(playerid, 0x8080C0FF, string);
Reporter[playerid] = 1;
SetTimerEx("Report1",60000, false, "i", playerid);

    }
    return 1;
}



COMMAND:pomoc(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new idx;
    if(IsPlayerConnected(playerid))
    {

        GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(params);
while ((idx < length) && (params[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = params[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /pomoc [text]");
return 1;
}
if(Pomoc1[playerid] == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "Moras sacekati minutu prije ponovnog slanja prijave.");
return 1;
}
  if(PlayerInfo[playerid][pMuted] == 1)
{
format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1);
SCM(playerid, 0xFF4444FF, string);
return 1;
}
format(string, sizeof(string), "Pomoc od %s[%d]: {BBDCED}*%s", sendername, playerid, (result));
GBroadCast(0x61AFD7FF,string,1);
ABroadCast(0x61AFD7FF,string,1);
format(string, sizeof(string), "|Vasa prijava glasi:{BBDCED} *%s", (result));
            SendClientMessage(playerid, 0x3499CCFF, string);
            Pomoc1[playerid] = 1;
SetTimerEx("Pomoc",60000, false, "i", playerid);

}
    return 1;
}



COMMAND:gamemasteri(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
        if(IsPlayerConnected(playerid))
    {
SendClientMessage(playerid, 0x416EFFC6, "{80BFFF}_______________GameMasteri_______________");
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pGameMaster] >= 1)
    {
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "{00FF15}GameMaster:(FFFFFF)%s|(00FF15)Lvl: %d ", sendername, PlayerInfo[i][pGameMaster]);
SendClientMessage(playerid, COLOR_WHITE, string);

}
}
}
}
return 1;
}

Komandu gamemasteri nisi ništa promijenio a za ovo ti najviše hvala...