[pomoc]lvl


Započeo mayk, Oktobar 02, 2011, 12:05:36 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim://
Detaljan opis problema:e jas si iam za lvl na 1min Exp+ i kako da napravim koga neki igrac ima 8/8 respects da kaci level bez /levelup
Dio skripte:
ewo cmd
if (strcmp(cmd, "/levelup", true) == 0)
 {
     if(IsPlayerConnected(playerid))
     {
   if (gPlayerLogged[playerid] != 0)
   {
    if(PlayerInfo[playerid][pLevel] >= 0)
    {
     new nxtlevel = PlayerInfo[playerid][pLevel]+1;
     new expamount = nxtlevel*levelexp;
     new infostring[128];
     if (PlayerInfo[playerid][pExp] < expamount)
     {
      format(infostring, 256, "   Za sledeci level vam treba %d Respekt Poena, a vi imate [%d] !",expamount,PlayerInfo[playerid][pExp]);
      SendClientMessage(playerid, COLOR_GRAD1, infostring);
      return 1;
     }
     else
     {
      format(string, sizeof(string), "~g~LEVEL UP~n~~w~Vi ste sada Level %d", nxtlevel);
      PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
      PlayerPlayMusic(playerid);
      PlayerInfo[playerid][pLevel]++;
      if(PlayerInfo[playerid][pDonateRank] > 0)
      {
          PlayerInfo[playerid][pExp] -= expamount;
          new total = PlayerInfo[playerid][pExp];
          if(total > 0)
          {
              PlayerInfo[playerid][pExp] = total;
          }
          else
          {
              PlayerInfo[playerid][pExp] = 0;
          }
      }
      else
      {
       PlayerInfo[playerid][pExp] = 0;
      }
      PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
      GameTextForPlayer(playerid, string, 5000, 1);
      format(infostring, 256, "   Kupili ste Level %d Ukucajte /upgrade", nxtlevel);
      SendClientMessage(playerid, COLOR_GRAD1, infostring);
      format(infostring, 256, "   Dali ste %d nepotrosene Upgrade Points-e",PlayerInfo[playerid][gPupgrade]);
      SendClientMessage(playerid, COLOR_GRAD2, infostring);
     }
    }
    return 1;
   }
   else
   {
    SendClientMessage(playerid, COLOR_GRAD1, "   Niste logirani !");
   }
  }
  return 1;
 }

a ewo toa za exp
public ITakoProshoJedanMinut()
{
        new i;
   for(i = 0; i < MAX_PLAYERS; i++)
   {
      if(!IsPlayerConnected(i))   continue;
      PlayerInfo[i ][pOdigraniMinuti] ++;  // OBRISI RAZMAK KADA KOPIRAÅ  KOD
      if(PlayerInfo [i ][pOdigraniMinuti] == 30)     // OBRISI RAZMAK KADA KOPIRAÅ  KOD
      {
         PlayerInfo[i ][pExp] ++;   // OBRISI RAZMAK KADA KOPIRAÅ  KOD
         PlayerInfo[i ][pOdigraniMinuti] = 0;   // OBRISI RAZMAK KADA KOPIRAÅ  KOD
         ShowClientMesssage(i, COLOR_LIGHTBLUE, "By Mikec: Dobili ste +1 EXP Posto ste igrali 30 minuta na serveru");
      }
   }
}

Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Poslednja Izmena: Oktobar 02, 2011, 17:20:47 POSLE PODNE od mayk