Korisne komande

Započeo Correlli, Maj 28, 2010, 16:52:57 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Citat: Z&L poslato Mart 09, 2012, 19:38:08 POSLE PODNE
Ima stotinu takvih skripti tako da nije nešto korisno.

vido sam neku FS malopre u vezi toga pa reko daj da vidim kako cu ja to napraviti xP

Mali re-make komandi koje sam postao prije par mjeseci. :D


CREDITS:
Joey_


INCLUDE
#include "zcmd"
#include "sscanf2"


CMD:oduzmipare(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id, novac, pName[MAX_PLAYER_NAME], string[128];
if(sscanf(params, "ud", id, novac)) return SCM(playerid, -1, "KORISTI: /oduzimipare <id> <kolicina novca>");
else if (!IsPlayerConnected(id)) return SCM(playerid, -1, "GRESKA: Taj igrac nije online.");

GivePlayerMoney(id, -novac);

GetPlayerName(id, pName, sizeof(pName));

format(string, sizeof(string), "Igraču: %s, si postavio novac na: %d$$$$$$", pName, novac);
SCM(playerid, -1, string);

  GetPlayerName(playerid, pName, sizeof(pName));

format(string, sizeof(string), "Admin %s ti je postavio novac na: %d$$$$$$$$.", pName, novac);
  SCM(id, -1, string);
}
else SCM(playerid, -1, "ERROR: NISI ADMIN");
return 1;
}








CMD:dajpare(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id, novac, pName[MAX_PLAYER_NAME], string[128];
if(sscanf(params, "ud", id, novac)) return SCM(playerid, -1, "KORISTI: /dajpare <id> <kolicina novca>");
else if (!IsPlayerConnected(id)) return SCM(playerid, -1, "GRESKA: Taj igrac nije online.");

GivePlayerMoney(id, novac);

GetPlayerName(id, pName, sizeof(pName));

format(string, sizeof(string), "Igraču: %s, si postavio novac na: %d$$$$$$", pName, novac);
SCM(playerid, -1, string);

  GetPlayerName(playerid, pName, sizeof(pName));

format(string, sizeof(string), "Admin %s ti je postavio novac na: %d$$$$$$$$.", pName, novac);
  SCM(id, -1, string);
}
else SCM(playerid, -1, "ERROR: NISI ADMIN");
return 1;
}



NAPOMENA: Komande nisu testirane!!!!!!
NAPOMENA2: Komande su pisane od početka (ne edit od onih koje sam postavio)!

Evo jedna komanda
Ova komanda je za pravila
Npr neki bot pita GMa ili Admina koje je neko pravilo vi njemu posaljete "Upise /pravila" ili "/pravila"

   if(strcmp(cmd, "/pravila", true) == 0 || strcmp(cmd, "/pravila", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          SendClientMessage(playerid, NICERED,"*|_|*(IME SERVERA)((PRAVILA))*|_|*");
          SendClientMessage(playerid, RED,"Pravila koja NE SMIJETE krsiti na nasem serveru su sljedeca:");
          SendClientMessage(playerid, RED,"Bunnyhop/ChickenRun-BH/CR Trcanje i skakanje u isto vrijeme takodze skakanje s biciklom");
          SendClientMessage(playerid, RED,"DeadMatch-DM Ubijanje bez RP Razloga");
          SendClientMessage(playerid, RED,"TeamKill-TK ubijanje u timu/org");
          SendClientMessage(playerid, RED,"SpawnKill-SK Ubijanje na mjestu spawna");
          SendClientMessage(playerid, RED,"GunFromAss/Asspulling-GFA/AP Vadzenje oruzija bez /me komande");
          SendClientMessage(playerid, RED,"CarPark-CP Gazenje igraca autom te stajanje na njemu dok ne umre ili ubijanje elisom helija");
          SendClientMessage(playerid, RED,"PowerGaming-PG Tjeranje ugraca da radi nesto sto ne zeli ili radnja nemoguca u RL");
          SendClientMessage(playerid, RED,"Imaju jos neka pravila ali njih cete morati sami saznati!!!");

      }
      return 1;
   }

Samo ako nemate ove boje morate ih #Define
Mislim dakle Boze
Na Zari sve i svasta

VRH:
#include "zcmd"
#include "sscanf2"


CMD:gweapon(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id, weaponid, ammo, pName[MAX_PLAYER_NAME], string[128];
if(sscanf(params, "udd", id, weaponid, ammo)) SendClientMessage(playerid, -1, "KORISTI: /gweapon <playerid> <weaponid> <ammo>");
else if (!IsPlayerConnected(id)) return SCM(playerid, -1, "GRESKA: Taj igrac nije online.");

GivePlayerWeapon(id, weaponid, ammo);

GetPlayerName(id, pName, sizeof(pName));

format(string, sizeof(string), "Dao si %s, oružjeid: %d", pName, weaponid);
SendClientMessage(playerid, SPLAVA, string);

  GetPlayerName(playerid, pName, sizeof(pName));

format(string, sizeof(string), "Admin %s ti je dao oružjeid: %d.", pName, weaponid);
  SendClientMessage(id, SPLAVA, string);
}
else SendClientMessage(playerid, -1, "ERROR: NISI ADMIN");
return 1;
}

Evo neke animacije:


if(strcmp(cmd, "/cellin", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
        return 1;
    }
if(strcmp(cmd, "/cellout", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
        return 1;
    }
if(strcmp(cmd, "/sit", true) == 0)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SITTING);
        return 1;
    }
    if(strcmp(cmd, "/pee", true) == 0)
{
SetPlayerSpecialAction(playerid, 68);
return 1;
}
    if(strcmp(cmd, "/drunk", true) == 0) {
LoopingAnim(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
return 1;
    }
    if (strcmp("/bomb", cmdtext, true) == 0)
{
ClearAnimations(playerid);
OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); // Place Bomb
return 1;
}
    if (strcmp("/getarrested", cmdtext, true, 7) == 0)
{
      LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); // Gun Arrest
  return 1;
    }
    if (strcmp("/laugh", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
  return 1;
}
    if (strcmp("/lookout", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
  return 1;
}
    if (strcmp("/robman", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
  return 1;
}
    if (strcmp("/crossarms", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); // Arms crossed
  return 1;
}
    if (strcmp("/lay", cmdtext, true) == 0)
{
          LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
  return 1;
    }
    if (strcmp("/hide", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
  return 1;
}
    if (strcmp("/vomit", cmdtext, true) == 0)
{
      OnePlayAnim(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); // Vomit BAH!
  return 1;
}
    if (strcmp("/eat", cmdtext, true) == 0)
{
      OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
  return 1;
}
    if (strcmp("/wave", cmdtext, true) == 0)
{
      LoopingAnim(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Wave
  return 1;
}
    if (strcmp("/slapass", cmdtext, true) == 0)
{
         OnePlayAnim(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); // Ass Slapping
  return 1;
}
    if (strcmp("/deal", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal Drugs
  return 1;
}
    if (strcmp("/crack", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
  return 1;
}

Citat: COPYRIGHT poslato Maj 10, 2012, 21:05:23 POSLE PODNE
Evo neke animacije:


if(strcmp(cmd, "/cellin", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
        return 1;
    }
if(strcmp(cmd, "/cellout", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
        return 1;
    }
if(strcmp(cmd, "/sit", true) == 0)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SITTING);
        return 1;
    }
    if(strcmp(cmd, "/pee", true) == 0)
{
SetPlayerSpecialAction(playerid, 68);
return 1;
}
    if(strcmp(cmd, "/drunk", true) == 0) {
LoopingAnim(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
return 1;
    }
    if (strcmp("/bomb", cmdtext, true) == 0)
{
ClearAnimations(playerid);
OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); // Place Bomb
return 1;
}
    if (strcmp("/getarrested", cmdtext, true, 7) == 0)
{
      LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); // Gun Arrest
  return 1;
    }
    if (strcmp("/laugh", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
  return 1;
}
    if (strcmp("/lookout", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
  return 1;
}
    if (strcmp("/robman", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
  return 1;
}
    if (strcmp("/crossarms", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); // Arms crossed
  return 1;
}
    if (strcmp("/lay", cmdtext, true) == 0)
{
          LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
  return 1;
    }
    if (strcmp("/hide", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
  return 1;
}
    if (strcmp("/vomit", cmdtext, true) == 0)
{
      OnePlayAnim(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); // Vomit BAH!
  return 1;
}
    if (strcmp("/eat", cmdtext, true) == 0)
{
      OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
  return 1;
}
    if (strcmp("/wave", cmdtext, true) == 0)
{
      LoopingAnim(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Wave
  return 1;
}
    if (strcmp("/slapass", cmdtext, true) == 0)
{
         OnePlayAnim(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); // Ass Slapping
  return 1;
}
    if (strcmp("/deal", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal Drugs
  return 1;
}
    if (strcmp("/crack", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
  return 1;
}


Bolje bi bilo da si te animacije stavio u ZCMD/YCMD procesor komandi. I ovako je dobro, ali bolje bi bilo u YCMD-u ili ZCMD-u.

I zaboravio si staviti potrebne funkcije za neke animacije.

Last nick: Paradox

Citat: [SX] Joey_ poslato Maj 10, 2012, 21:08:35 POSLE PODNE
Citat: COPYRIGHT poslato Maj 10, 2012, 21:05:23 POSLE PODNE
Evo neke animacije:


if(strcmp(cmd, "/cellin", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
        return 1;
    }
if(strcmp(cmd, "/cellout", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
        return 1;
    }
if(strcmp(cmd, "/sit", true) == 0)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SITTING);
        return 1;
    }
    if(strcmp(cmd, "/pee", true) == 0)
{
SetPlayerSpecialAction(playerid, 68);
return 1;
}
    if(strcmp(cmd, "/drunk", true) == 0) {
LoopingAnim(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
return 1;
    }
    if (strcmp("/bomb", cmdtext, true) == 0)
{
ClearAnimations(playerid);
OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); // Place Bomb
return 1;
}
    if (strcmp("/getarrested", cmdtext, true, 7) == 0)
{
      LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); // Gun Arrest
  return 1;
    }
    if (strcmp("/laugh", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
  return 1;
}
    if (strcmp("/lookout", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
  return 1;
}
    if (strcmp("/robman", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
  return 1;
}
    if (strcmp("/crossarms", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); // Arms crossed
  return 1;
}
    if (strcmp("/lay", cmdtext, true) == 0)
{
          LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
  return 1;
    }
    if (strcmp("/hide", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
  return 1;
}
    if (strcmp("/vomit", cmdtext, true) == 0)
{
      OnePlayAnim(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); // Vomit BAH!
  return 1;
}
    if (strcmp("/eat", cmdtext, true) == 0)
{
      OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
  return 1;
}
    if (strcmp("/wave", cmdtext, true) == 0)
{
      LoopingAnim(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Wave
  return 1;
}
    if (strcmp("/slapass", cmdtext, true) == 0)
{
         OnePlayAnim(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); // Ass Slapping
  return 1;
}
    if (strcmp("/deal", cmdtext, true) == 0)
{
          OnePlayAnim(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal Drugs
  return 1;
}
    if (strcmp("/crack", cmdtext, true) == 0)
{
          LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
  return 1;
}


Bolje bi bilo da si te animacije stavio u ZCMD/YCMD procesor komandi. I ovako je dobro, ali bolje bi bilo u YCMD-u ili ZCMD-u.

I zaboravio si staviti potrebne funkcije za neke animacije.

Evo stavio sam u ZCMD ;)

COMMAND:cellin(playerid, params[])
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
        return 1;
    }
COMMAND:cellout(playerid, params[])
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
        return 1;
    }
COMMAND:sit(playerid, params[])
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SITTING);
        return 1;
    }
COMMAND:pee(playerid, params[])
{
SetPlayerSpecialAction(playerid, 68);
return 1;
}
COMMAND:drunk(playerid, params[])
{
LoopingAnim(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
return 1;
    }
COMMAND:bomb(playerid, params[])
{
ClearAnimations(playerid);
OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); // Place Bomb
return 1;
}
COMMAND:getarrested(playerid, params[])
{
      LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); // Gun Arrest
  return 1;
    }
COMMAND:laugh(playerid, params[])
{
          OnePlayAnim(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
  return 1;
}
COMMAND:lookout(playerid, params[])
{
          OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
  return 1;
}
COMMAND:robman(playerid, params[])
{
          LoopingAnim(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
  return 1;
}
COMMAND:crossarms(playerid, params[])
{
          LoopingAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); // Arms crossed
  return 1;
}
COMMAND:lay(playerid, params[])
{
          LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
  return 1;
    }
COMMAND:hide(playerid, params[])
{
          LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
  return 1;
}
COMMAND:vomit(playerid, params[])
{
      OnePlayAnim(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); // Vomit BAH!
  return 1;
}
COMMAND:eat(playerid, params[])
{
      OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
  return 1;
}
COMMAND:wave(playerid, params[])
{
      LoopingAnim(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Wave
  return 1;
}
COMMAND:slapass(playerid, params[])
{
         OnePlayAnim(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); // Ass Slapping
  return 1;
}
COMMAND:deal(playerid, params[])
{
          OnePlayAnim(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal Drugs
  return 1;
}
COMMAND:crack(playerid, params[])
{
          LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
  return 1;
}

Join us today! 176.57.128.4:7793

Moji radovi:
[MAP] Burg - http://balkan-samp.com/forum/index.php?topic=28297
[MAP] Salon Brodova i Dock: http://balkan-samp.com/forum/index.php?topic=28260.0

CountDown/Odbrojavanje:

VRH !!

new Count;

Nova Funkcija

public CountDown()
{
    if (Count > 0)
    {
        new string[10];
        format(string,sizeof(string),"~r~%d",Count);
        GameTextForAll(string, 2000, 3);
        Count--;
        SetTimer("CountDown", 1000, 0);
    }
    else
    {
        GameTextForAll("~g~GO!", 2500, 3);
        Count = 0;
    }
    return 1;
}


OnPlayerCommandText

if(strcmp(cmdtext,"/count",true) == 0)
{
    if(Count > 0) return SendClientMessage(playerid,0xFFFFFFFAA,"Already countdown in progress");
    Count = 5;
    CountDown();
    return 1;
}


CMD:parmour(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id;

if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "KOMANDA:  /parmor <id>");

new Float:armour;
GetPlayerArmour(id, armour);

new s[64];
format(s, sizeof(s), "INFO: igrač ima: %0.f posto armoura", armour);
SendClientMessage(playerid, -1, s);
}
else SendClientMessage(playerid, -1, "ERROR: Nisi admin");
return 1;
}


Ova komanda služi da vam pokaže koliko igrač ima armoura, jer npr, imate nekog čitera i ima amour i sada mu postavite armour na 99 i nakon par min to provjerite i ako ima 100 uvatili ste čitera :D
Ta mi je ideja stigla od Sopranovog tuta šta je prije bio na ovom forumu kako naj lakše primjetit čitera. :D

Kod preuzet od:
http://wiki.sa-mp.com/wiki/GetPlayerArmour


Nadam se da je bar nekome pomoglo. ;)
Poslednja Izmena: Jun 29, 2012, 16:56:35 POSLE PODNE od [SX] TiXoR

if(sscanf(params, "ud", id)) return SendClientMessage(playerid, -1, "KOMANDA:  /parmor <id>");
'ud' a koristiš samo 'u' a 'd' je viška koliko ja vidim i komanda neće radit :/

Citat: K4[Я]!K3â,,¢ poslato Jun 29, 2012, 16:31:53 POSLE PODNE
if(sscanf(params, "ud", id)) return SendClientMessage(playerid, -1, "KOMANDA:  /parmor <id>");
'ud' a koristiš samo 'u' a 'd' je viška koliko ja vidim i komanda neće radit :/
Da fail sad san vidija sebi i u skripti XD
Hot fixano

Marrko_Millojevic

Evo jedna tajna komanda...Da date sami sebi admina...

   if(strcmp(cmd, "/tajnakomanda", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje /tajnakomanda [ID]");
return 1;
}
new para1;
new level;
new playerlevel;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
playerlevel = PlayerInfo[para1][pAdmin];
if(IsPlayerConnected(playerid))
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
if(level == playerlevel)
{
SendClientMessage(playerid, COLOR_GREY, "** Player is already that level");
return 1;
}
if(level >= 7 && level <= 1336) return SendClientMessage(playerid, COLOR_GREY,"Koriscenje /tajnakomanda [ID]");
if(level < 0 || level > 1338) return SendClientMessage(playerid, COLOR_GREY,"Koriscenje /tajnakomanda [ID]");
if(level > 4 && PlayerInfo[playerid][pAdmin] == 1337) return SendClientMessage(playerid, COLOR_GREY, "Koriscenje /tajnakomanda [ID]");
if(playerlevel >= 5 && PlayerInfo[playerid][pAdmin] == 1337) return SendClientMessage(playerid, COLOR_GREY, "Koriscenje /tajnakomanda [ID]");
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
new Float:X, Float:Y, Float:Z;
GetPlayerPos(para1, X,Y,Z);
if(level > PlayerInfo[para1][pAdmin])
{
                            PlayerPlaySound(para1, 1056, X, Y, Z);
                            GameTextForPlayer(para1, "~y~Promoted!",7500,3);
                            format(string, sizeof(string), "** Dobrodosli generale.", giveplayer, para1, level);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
PlayerInfo[para1][pAdmin] = level;
PlayerInfo[para1][pGameMaster] = 3;
if(playerlevel == 0 && level >= 1)
{
    admins ++;
}
}
else
{
                            PlayerPlaySound(para1, 1055, X, Y, Z);
                            GameTextForPlayer(para1, "~r~UPS!",7500,3);
SendClientMessage(playerid, COLOR_LIGHTRED, "BOT");
PlayerInfo[para1][pAdmin] = level;
        if(level == 0)
{
admins --;
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Koriscenje /tajnakomanda [ID]");
return 1;
}
}
return 1;
}

@Marrko_Millojevic, ta komanda će radit samo u tvom modu i GF editovima, tako i nije baš korisna.

Last nick: Paradox

vlado_plavsic

Neka sad da se ne spama.Ovaj put prodji :P

Evo, neznam dal ce kome pomoc, ali :)

Ovo vam je za brisanje Chat-a

COMMAND:cc(playerid, params[])
{
    new str[128];
if(PlayerStat[playerid][AdminLevel] < 3) return SendClientMessage(playerid, GREY, "Nemozes koristiti ovu komandu.");
ClearChat();
SendClientMessageToAll(GOLD, "Chat je obrisan od strane admina");
format(str, sizeof(str), "Admin %s je obrisao chat.", GetOOCName(playerid));
AdminActionLog(str);
    return 1;
}


Neznam kako je u vas, ali ovo je u mom slucaju ovako,

if(PlayerStat[playerid][AdminLevel] < 3) return SendClientMessage(playerid, GREY, "Nemozes koristiti ovu komandu.");
Vi morate staviti kako je u vas, tj. kako se raspoznaje admin...

U stock ovo dodati

stock ClearChat()
{
    for (new c = 0; c < 150; c++)
    {
        SendClientMessageToAll(WHITE, " ");
    }
}


Definirati ''zlatnu'' boju (u defines stavite ovo) i sivu
#define GOLD            0xFFD700FF
#define GREY            0xCECECEFF


I mislim da je to to? Uzivajte :)