[POMOC]oko aduty

Započeo Alen Hadzimustafic, Jun 30, 2013, 00:31:31 PRE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Skripta koju koristim:moj mod od 0.
Opis problema:ocu da napravim adutyoff ali da adutyoff moze koristit admin koji je na duznosti a ne da je moze koristit i kad nije na duznosti msm da sam bio jasan :D
Dio skripte://
Slika/Video://
tnx unaprijed

Napravis varijablu i stavis je na 1 kada admin id na duznost,a onda napravis provjeru u komandi kada ide sa duznosti da provjerava da li je na duznosti,ako ne znas to odraditi daj mi komande da ti uradim




Balkan Ulice RPG opis servera: Click



-Tutorial za mijesanje ID-ova na vozilima: Click

Citat: [BURPG] Wistaa poslato Jun 30, 2013, 00:36:55 PRE PODNE
Napravis varijablu i stavis je na 1 kada admin id na duznost,a onda napravis provjeru u komandi kada ide sa duznosti da provjerava da li je na duznosti,ako ne znas to odraditi daj mi komande da ti uradim
evo ti dutyon a nisam nap dutyoff
CMD:adutyon(playerid, params[])
{
      if(PlayerInfo[playerid][pAdmin] >= 1)
      {
      new string[128], ime[MAX_PLAYER_NAME];
  SetPlayerArmour(playerid,100);
  SetPlayerHealth(playerid,100);
  SetPlayerColor(playerid,0x999999FF);
  SetPlayerSkin(playerid,185);
  GetPlayerName(playerid, ime, sizeof(ime));
      format(string,sizeof(string),"[{1F54F2}BS-RP{FFFFFF}]: {1F54F2}Admin {1F54F2}%s{FFFFFF} je sada na duznosti.", ime);
      SendClientMessageToAll(BIJELA,string);
      format(string, sizeof(string), "~w~VI ~b~STE SADA NA ~w~ADMIN ~b~DUZNOSTI");
  GameTextForPlayer(playerid, string, 3000, 4);
      }
      return 1;
}

CMD:adutyon(playerid, params[])
{
      if(PlayerInfo[playerid][pAdmin] >= 1)
      {
if(AdminDuty[playerid] == 0)
        {
      new string[128], ime[MAX_PLAYER_NAME];
  SetPlayerArmour(playerid,100);
  SetPlayerHealth(playerid,100);
  SetPlayerColor(playerid,0x999999FF);
  SetPlayerSkin(playerid,185);
  GetPlayerName(playerid, ime, sizeof(ime));
      format(string,sizeof(string),"[{1F54F2}BS-RP{FFFFFF}]: {1F54F2}Admin {1F54F2}%s{FFFFFF} je sada na duznosti.", ime);
      SendClientMessageToAll(BIJELA,string);
      format(string, sizeof(string), "~w~VI ~b~STE SADA NA ~w~ADMIN ~b~DUZNOSTI");
  GameTextForPlayer(playerid, string, 3000, 4);
      }
      return 1;
}

Citat: Boca A.k.A Bocilinjo poslato Jun 30, 2013, 00:41:49 PRE PODNE
CMD:adutyon(playerid, params[])
{
      if(PlayerInfo[playerid][pAdmin] >= 1)
      {
if(AdminDuty[playerid] == 0)
        {
      new string[128], ime[MAX_PLAYER_NAME];
  SetPlayerArmour(playerid,100);
  SetPlayerHealth(playerid,100);
  SetPlayerColor(playerid,0x999999FF);
  SetPlayerSkin(playerid,185);
  GetPlayerName(playerid, ime, sizeof(ime));
      format(string,sizeof(string),"[{1F54F2}BS-RP{FFFFFF}]: {1F54F2}Admin {1F54F2}%s{FFFFFF} je sada na duznosti.", ime);
      SendClientMessageToAll(BIJELA,string);
      format(string, sizeof(string), "~w~VI ~b~STE SADA NA ~w~ADMIN ~b~DUZNOSTI");
  GameTextForPlayer(playerid, string, 3000, 4);
      }
      return 1;
}

430) : error 017: undefined symbol "AdminDuty"
(430) : warning 215: expression has no effect
(430) : error 001: expected token: ";", but found "]"
(430) : error 029: invalid expression, assumed zero
(430) : fatal error 107: too many error messages on one line
:'(  :'(  :'(  :'( baca ove errore

Negdje na pocetku skripte napravis varijablu

new ADuty[MAX_PLAYERS];

Pod OnPlayerConnect stavis da ti postavlja na 0

ADuty[playerid]  = 0;


CMD:adutyon(playerid, params[])
{
      if(PlayerInfo[playerid][pAdmin] >= 1)
      {
      new string[128], ime[MAX_PLAYER_NAME];
  SetPlayerArmour(playerid,100);
  SetPlayerHealth(playerid,100);
  SetPlayerColor(playerid,0x999999FF);
  SetPlayerSkin(playerid,185);
  GetPlayerName(playerid, ime, sizeof(ime));
         Aduty[playerid] = 1;
      format(string,sizeof(string),"[{1F54F2}BS-RP{FFFFFF}]: {1F54F2}Admin {1F54F2}%s{FFFFFF} je sada na duznosti.", ime);
      SendClientMessageToAll(BIJELA,string);
      format(string, sizeof(string), "~w~VI ~b~STE SADA NA ~w~ADMIN ~b~DUZNOSTI");
  GameTextForPlayer(playerid, string, 3000, 4);
      }
      return 1;
}



Kada budes radio za duty off,uradis ovako provjeru unutar komande


if(Aduty[playerid] == 0)
{
        SendClientMessage(playerid, BIJELA, "Niste Admin na duznosti!");
        return 1;
Poslednja Izmena: Jun 30, 2013, 00:54:04 PRE PODNE od [BURPG] Wistaa




Balkan Ulice RPG opis servera: Click



-Tutorial za mijesanje ID-ova na vozilima: Click

Citat: [BURPG] Wistaa poslato Jun 30, 2013, 00:53:51 PRE PODNE
Negdje na pocetku skripte napravis varijablu

new ADuty[MAX_PLAYERS];

Pod OnPlayerConnect stavis da ti postavlja na 0

ADuty[playerid]  = 0;


CMD:adutyon(playerid, params[])
{
      if(PlayerInfo[playerid][pAdmin] >= 1)
      {
      new string[128], ime[MAX_PLAYER_NAME];
  SetPlayerArmour(playerid,100);
  SetPlayerHealth(playerid,100);
  SetPlayerColor(playerid,0x999999FF);
  SetPlayerSkin(playerid,185);
  GetPlayerName(playerid, ime, sizeof(ime));
         Aduty[playerid] = 1;
      format(string,sizeof(string),"[{1F54F2}BS-RP{FFFFFF}]: {1F54F2}Admin {1F54F2}%s{FFFFFF} je sada na duznosti.", ime);
      SendClientMessageToAll(BIJELA,string);
      format(string, sizeof(string), "~w~VI ~b~STE SADA NA ~w~ADMIN ~b~DUZNOSTI");
  GameTextForPlayer(playerid, string, 3000, 4);
      }
      return 1;
}



Kada budes radio za duty off,uradis ovako provjeru unutar komande


if(Aduty[playerid] == 0)
{
        SendClientMessage(playerid, BIJELA, "Niste Admin na duznosti!");
        return 1;

Tnx radi