[Pomoc] 2 komande

Započeo ...Nikola..., Avgust 01, 2012, 19:23:13 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: GTA-RP
Detaljan opis problema: Da mi ovo if (strcmp("/dajlevel", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] = 5)
{
ShowPlayerDialog(playerid,9923,DIALOG_STYLE_INPUT,"Level up","Za koliko zelite povecati level drugima ? ","Uredu","Odustani");
}
return 1;
}
i ovo if(dialogid = 9923)
{
if(response)
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
PlayerInfo[i][pLevel] = PlayerInfo[i][pLevel] + strval(inputtext);
new string[64];
format(string,sizeof(string),"Admin vam je povecao level za %d" ,strval(inputtext));
SendClientMessageToAll(COLOR_RED,string);
}
}
}
stavi u obicnu komandu strcmp,ja sam pokusao ali to nista ne valja xD if (strcmp("/givelevelall", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pOSC] == 6)
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
PlayerInfo[i][pLevel] = PlayerInfo[i][pLevel] + strval(inputtext);
new string[64];
format(string,sizeof(string),"[ADMIN] je svima dao %d level upa" ,strval(inputtext));
SendClientMessageToAll(COLOR_YELLOW,string);
}
}
return 1;
}

Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
Poslednja Izmena: Avgust 02, 2012, 19:31:47 POSLE PODNE od ...Nikola...

nikola nikola :D toliko modova a neiskusan :D  (sala :D )

if (strcmp("/dajlevel", cmdtext, true, 10) == 0)
{
                          if(PlayerInfo[playerid][pAdmin] = 5)
                          {
                            ShowPlayerDialog(playerid,9923,DIALOG_STYLE_INPUT,"Level up","Za koliko zelite povecati level drugima ? ","Uredu","Odustani");
                          }
return 1;
}

if (strcmp("/dajnovac", cmdtext, true, 10) == 0)
{
                          if(PlayerInfo[playerid][pAdmin] = 5)
                          {
                            ShowPlayerDialog(playerid,9924,DIALOG_STYLE_INPUT,"GiveMoney","Koliko novca zelite dati igracima ? ","Uredu","Odustani");
                          }
return 1;
}

              if (strcmp("/dajpayday", cmdtext, true, 10) == 0)
{
                          if(PlayerInfo[playerid][pAdmin] = 5)
                          {
                            PayDay(); // ili koja ti je vec funkcija za payday
                          }
return 1;
}





OnDialogRespon...

if(dialogid = 9923)
{

   if(response)
   {
      for (new i = 0; i != MAX_PLAYERS; ++i)
     {
        PlayerInfo[i][pLevel] = PlayerInfo[i][pLevel] + strval(inputtext);
        new string[64];
        format(string,sizeof(string),"Admin vam je povecao level za %d" ,strval(inputtext));
        SendClientMessageToAll(COLOR_RED,string);
     }
   }

}


if(dialogid = 9924)
{

   if(response)
   {
      for (new i = 0; i != MAX_PLAYERS; ++i)
     {
        GivePlayerMoney(playerid, strval(inputttext));
        new string[64];
        format(string,sizeof(string),"Admin vam je povecao novac za %d" ,strval(inputtext));
        SendClientMessageToAll(COLOR_RED,string);
     }
   }

}


Poslednja Izmena: Avgust 01, 2012, 19:58:16 POSLE PODNE od Phat-Jo[.pwn]


obicna komanda ?! nakon 4 edita ? svasta :D ...

imao si vec to na forumu trebao si pogledat

Citat: [SX] TiXoR poslato April 15, 2012, 11:38:46 PRE PODNE
Citat: | S-RP | K@lib@r .300 poslato April 15, 2012, 09:48:55 PRE PODNE
Trebam komandu s kojom svim Online igracima das Level i novac(dvije posebne komande). Hvala!
//
stock GiveMoneyToAll(money)
{
  foreach(Player,i)
  {
    GivePlayerMoney(i, money);
  }
  return true;
}

Eto ti stock, pa ti sada složi komandu :=)

((stock je  složen prema ovom, neznam oće raditi))

stock PlayAudioStreamForAll(link[]) // prema ovoom je složen
{
  foreach(Player,i)
  {
     PlayAudioStreamForPlayer(i,link);
  }
  return true;
}



//////////////////////////

evo ti i komanda



CMD:givemoneytoall(playerid, params[])
{
   if(IsPlayerAdmin(playerid))
   {
      new novac;
      if(sscanf(params, "d", novac)) return SCM(playerid, -1, "KORISTI: /givemoneytoall <novac>");
      GiveMoneyToAll(novac);
      SCM(playerid, -1, "Dao si lovu svima");
   }
   else SCM(playerid, -1, "ERROR: NISI ADMIN");
   return 1;
}


if (strcmp("/dajlevel", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] = 5)
{
ShowPlayerDialog(playerid,9923,DIALOG_STYLE_INPUT,"Level up","Za koliko zelite povecati level drugima ? ","Uredu","Odustani");
}
return 1;
}

if(dialogid = 9923)
{
if(response)
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
PlayerInfo[i][pLevel] = PlayerInfo[i][pLevel] + strval(inputtext);
new string[64];
format(string,sizeof(string),"Admin vam je povecao level za %d" ,strval(inputtext));
SendClientMessageToAll(COLOR_RED,string);
}
}
}

Stavi mi u komandu,ja sam pokusao ovako ali ne radi xD ne znam kako omg if (strcmp("/givelevelall", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pOSC] == 6)
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
PlayerInfo[i][pLevel] = PlayerInfo[i][pLevel] + strval(inputtext);
new string[64];
format(string,sizeof(string),"[ADMIN] je svima dao %d level upa" ,strval(inputtext));
SendClientMessageToAll(COLOR_YELLOW,string);
}
}
return 1;
}
Poslednja Izmena: Avgust 02, 2012, 19:32:13 POSLE PODNE od ...Nikola...