[Pomoc] WAR

Započeo mrzli1999, Avgust 29, 2013, 22:58:13 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:Nezz koja je
Detaljan opis problema: Ja normalno pokrenem war(rat) i kada netko nekoga ubije ne pribrajaju se bodovi i kada taj netko umre spawna se natrag u areni za war ali bez oruzja. Nisam bas neki pawno strucnjak, ali ako bi mi netko to popravio bih mu jako zahvalan  ;D
Dio skripte:
CMD:zapocnirat(playerid, params[])
{
new tim1,tim2,vrijemez, string[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params, "ddd", tim1, tim2, vrijemez))
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
SCM(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /zapocnirat [tim1] [tim2] [vrijeme(minute)]");
SCM(playerid, WHITE, "{FF0000}Dostupno: {FFFF80}5- Yakuza | 6- L.C.N | 8- Hitman | 12.- TSC | 15-GSF ");
}
}
else
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
foreach (Player, i)
{
      if(PlayerInfo[i][pMember] == tim1 || PlayerInfo[i][pLeader] == tim1)
      {

SetPVarInt(i, "Ratuje", 1); SetPVarInt(i, "Tim1", 1);
new Float:fa, Float:fy, Float:fu;
GetPlayerPos( playerid, fa, fy, fu );
format(string, sizeof(string), "{FF0000}RAT| Pokrenuo Admin: {FFFF80}%s", sendername);SCM(i, WHITE, string);
ratnitext1 = CreatePlayer3DTextLabel(i,"{0080C0}Plavi {808080}Tim",0x46A3FFFF,fa,fy,fu,40.0, i);
SetPlayerInterior(i, 15);
new rande = random(sizeof(RandomArenaSpawnsTim1));
SetPlayerPos(i, RandomArenaSpawnsTim1[rande][0], RandomArenaSpawnsTim1[rande][1], RandomArenaSpawnsTim1[rande][2]);
GivePlayerWeapon(i, 4, 2);GivePlayerWeapon(i, 18, 50);GivePlayerWeapon(i, 24, 120);GivePlayerWeapon(i, 25, 120);GivePlayerWeapon(i, 29, 200);
GivePlayerWeapon(i, 33, 100);RatnoVrijeme = vrijemez*60;TextDrawShowForPlayer(i, crvenitim);plavitimkills= 0; crvenitimkills = 0;
TextDrawShowForPlayer(i, plavitim);
TextDrawShowForPlayer(i, ratnaz);
TextDrawShowForPlayer(i, preostalovrijeme);
  }
  if(PlayerInfo[i][pMember] == tim2 ||PlayerInfo[i][pLeader] == tim2)
{

SetPVarInt(i, "Ratuje", 1); SetPVarInt(i, "Tim2", 1);
SetPlayerInterior(i, 15);
new Float:fa, Float:fy, Float:fu;
GetPlayerPos( playerid, fa, fy, fu );format(string, sizeof(string), "{FF0000}RAT| Pokrenuo Admin: {FFFF80}%s", sendername);SCM(i, WHITE, string);
ratnitext2 = CreatePlayer3DTextLabel(i,"{FF4141}Crveni {808080}Tim",0xFF5E5EFF,fa,fy,fu,40.0, i);plavitimkills= 0; crvenitimkills = 0;
new rande = random(sizeof(RandomArenaSpawnsTim2));
RatnoVrijeme = vrijemez *60;
SetPlayerPos(i, RandomArenaSpawnsTim2[rande][0], RandomArenaSpawnsTim2[rande][1], RandomArenaSpawnsTim2[rande][2]);
GivePlayerWeapon(i, 4, 2);GivePlayerWeapon(i, 18, 50);GivePlayerWeapon(i, 24, 120);GivePlayerWeapon(i, 25, 120);GivePlayerWeapon(i, 29, 200);
GivePlayerWeapon(i, 33, 100);
TextDrawShowForPlayer(i, crvenitim);
TextDrawShowForPlayer(i, plavitim);
TextDrawShowForPlayer(i, ratnaz);
TextDrawShowForPlayer(i, preostalovrijeme);
}
}
}
}
return 1;
}
CMD:zavrsirat(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(RatnoVrijeme != 0)
{
RatnoVrijeme = 0;
foreach(Player, i)
{
if(GetPVarInt(i, "Ratuje") != 0)
{
    new string[128];
    new sendername[MAX_PLAYER_NAME];
DeletePlayer3DTextLabel(i, ratnitext1);DeletePlayer3DTextLabel(i, ratnitext2);SetPVarInt(i, "Tim1", 0);SetPVarInt(i, "Tim2", 0);
SetPVarInt(i, "Ratuje", 0); ResetPlayerWeapons(i); SpawnPlayer(i); TextDrawHideForPlayer(i, preostalovrijeme);TextDrawHideForPlayer(i, crvenitim);TextDrawHideForPlayer(i, plavitim);TextDrawHideForPlayer(i, ratnaz);
format(string,sizeof(string), "{FF0000}Rat je ponisten! | {FFFF80}Admin: %s",  sendername);SCM(i, 0xFF4141FF, string);
}
}
                                new string1[128],idname[MAX_PLAYER_NAME];
format(string1,sizeof(string1), "{FF0000}Ponistio si{FFFF80} Rat ", idname);SCM(playerid, 0xFF4141FF, string1);
}
else SendClientMessage(playerid, COLOR_GRAD1, "Rat nije u toku!");
}
else SendClientMessage(playerid, COLOR_GRAD1, "Nisi ovlasten !");
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Poslednja Izmena: Avgust 29, 2013, 22:58:25 POSLE PODNE od mrzli1999


Daj sve sto je u vezi war-a
[/center]

Znaci, War se pokrene normalno na /zapocnirat i ima onaj brojac scora i sve, ali kad netko umre, taj death tj. score se ne pribraja na taj brojac. Taj ubijeni igrac se natrag normalno spawna u areni ali bez oruzja. Mogu napraviti video ako treba.
Poslednja Izmena: Avgust 30, 2013, 19:06:05 POSLE PODNE od mrzli1999

Rauzmem te ja ,daj  mi sve sto se tice wara da ti namestim sve i da vidim u cemu je problem ...
[/center]

public SetPlayerSpawn(playerid)

if(IsPlayerConnected(playerid))
   {
      if(GetPVarInt(playerid, "Ratuje") == 1)
      {
      if(GetPVarInt(playerid, "Tim1") == 1)
      {
         SetPlayerInterior(playerid, 15);
         new rande = random(sizeof(RandomArenaSpawnsTim1));
         SetPlayerPos(playerid, RandomArenaSpawnsTim1[rande][0], RandomArenaSpawnsTim1[rande][1], RandomArenaSpawnsTim1[rande][2]);
         GivePlayerWeapon(playerid, 4, 2);GivePlayerWeapon(playerid, 18, 50);GivePlayerWeapon(playerid, 24, 120);GivePlayerWeapon(playerid, 25, 120);GivePlayerWeapon(playerid, 29, 200);
         GivePlayerWeapon(playerid, 33, 100);
         return 1;
      }
      else if(GetPVarInt(playerid, "Tim2") == 1)
      {
         SetPlayerInterior(playerid, 15);
         new rande = random(sizeof(RandomArenaSpawnsTim2));
         SetPlayerPos(playerid, RandomArenaSpawnsTim2[rande][0], RandomArenaSpawnsTim2[rande][1], RandomArenaSpawnsTim2[rande][2]);
         GivePlayerWeapon(playerid, 4, 2);GivePlayerWeapon(playerid, 18, 50);GivePlayerWeapon(playerid, 24, 120);GivePlayerWeapon(playerid, 25, 120);GivePlayerWeapon(playerid, 29, 200);
         GivePlayerWeapon(playerid, 33, 100);
         return 1;
         }
      }
      new skin = GetPlayerSkin(playerid);
      SetPlayerAttachedObject(playerid, GetSlot(playerid), PlayerInfo[playerid][pKosa], 2, SkinKosaOffSet[skin][0], SkinKosaOffSet[skin][1], SkinKosaOffSet[skin][2], SkinKosaOffSet[skin][3], SkinKosaOffSet[skin][4], SkinKosaOffSet[skin][5], SkinKosaOffSet[skin][8], SkinKosaOffSet[skin][8], SkinKosaOffSet[skin][8]);
       
      if(PlayerInfo[playerid][pTut] == 0)
       {
         gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
         SetPlayerInterior(playerid, 0);
         PlayerInfo[playerid][pInt] = 0;
            PlayAudioStreamForPlayer(playerid, "http://k005.kiwi6.com/hotlink/rtt1un3at1/don_omar_y_lucenzo_danza_kuduro_croatian_lyrics_hrvatski_prijevod.mp3");
         SetPlayerPos(playerid, 1174.6650,-1179.7308,91.4111);
            SetPlayerCameraPos(playerid, 251.8534,-1764.3707,15.7109); SetPlayerCameraLookAt(playerid, 251.8534,-1764.3707,15.7109);
         SetPlayerFacingAngle(playerid, 280);
         TogglePlayerControllable(playerid, 0);
         RegistrationStep[playerid] = 1;
         ClearChatbox(playerid, 10);
         SendClientMessage(playerid, COLOR_SVETLOPLAVA, "Ispunite sledece podatke...");
         ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "{00C0FF}Registracija - {F3FF02}Kojeg ste spola?", "Musko \nZensko", "U redu", "Odustani");
         ClearChatbox(playerid, 2);
         return 1;
       }
      if(AdminSpec[playerid] == 1)
      {
          return 1;
      }
      new rand;
      if(PlayerPaintballing[playerid] != 0)
      {
          SafeResetPlayerWeapons(playerid);
            SafeGivePlayerWeapon(playerid, 29, 999);
          rand = random(sizeof(PaintballSpawns));
         SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
          return 1;


public SetPlayerUnjail()

if(GetPVarInt(i, "Ratuje") == 1 && RatnoVrijeme != 0)
         {

            format(string, sizeof(string), "~g~Preostalo vrijeme:~b~%d sec", RatnoVrijeme);
            TextDrawSetString(preostalovrijeme,string);
            format(string, sizeof(string), "~r~Crveni tim:~b~%d", crvenitimkills);
            TextDrawSetString(crvenitim, string);
            format(string, sizeof(string), "~r~Plavi tim:~b~%d", plavitimkills);
            TextDrawSetString(plavitim, string);
         }
         if(GetPVarInt(i, "Ratuje") == 1 && RatnoVrijeme <= 0)
         {
            DeletePlayer3DTextLabel(i, ratnitext1);DeletePlayer3DTextLabel(i, ratnitext2);SetPVarInt(i, "Tim1", 0);SetPVarInt(i, "Tim2", 0);
            SetPVarInt(i, "Ratuje", 0); ResetPlayerWeapons(i); SpawnPlayer(i); TextDrawHideForPlayer(i, ratnaz);
            TextDrawHideForPlayer(i, preostalovrijeme);TextDrawHideForPlayer(i, crvenitim);TextDrawHideForPlayer(i, plavitim);
         }
          if(IsABoat(newcar))
         {
             if(PlayerInfo[pBoatLic] < 1 && GetPlayerState(i) == 2)
            {
                RemovePlayerFromVehicle(i);
            }
         }
         else if(IsAPlane(newcar))
         {
             if(PlayerInfo[pFlyLic] < 1 && GetPlayerState(i) == 2)
            {
                if(TakingLesson == 1) { }
            }
         }
         else
         {
            if(PlayerInfo[pCarLic] < 1 && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
            {
               if(TakingLesson == 1) { }
            }
if(GetPVarInt(i, "Ratuje") == 1 && RatnoVrijeme != 0)
         {

            format(string, sizeof(string), "~g~Preostalo vrijeme:~b~%d sec", RatnoVrijeme);
            TextDrawSetString(preostalovrijeme,string);
            format(string, sizeof(string), "~r~Crveni tim:~b~%d", crvenitimkills);
            TextDrawSetString(crvenitim, string);
            format(string, sizeof(string), "~r~Plavi tim:~b~%d", plavitimkills);
            TextDrawSetString(plavitim, string);
         }
         if(GetPVarInt(i, "Ratuje") == 1 && RatnoVrijeme <= 0)
         {
            DeletePlayer3DTextLabel(i, ratnitext1);DeletePlayer3DTextLabel(i, ratnitext2);SetPVarInt(i, "Tim1", 0);SetPVarInt(i, "Tim2", 0);
            SetPVarInt(i, "Ratuje", 0); ResetPlayerWeapons(i); SpawnPlayer(i); TextDrawHideForPlayer(i, ratnaz);
            TextDrawHideForPlayer(i, preostalovrijeme);TextDrawHideForPlayer(i, crvenitim);TextDrawHideForPlayer(i, plavitim);
         }

public LoadStuff()

RatnoVrijeme = strval(arrCoords[4]);
      plavitimkills = strval(arrCoords[5]);
      crvenitimkills = strval(arrCoords[6]);

if(Security == 0 || Security == 1)
      {
      }
      else
      {
          GameModeExit();
      }
   }
   else
   {
       GameModeExit();
   }
   return 1;
}

public SaveStuff()
{
   new coordsstring[256];
   format(coordsstring, sizeof(coordsstring), "%d,%d,%d,%d", Jackpot,Tax,TaxValue,Security,RatnoVrijeme,plavitimkills, crvenitimkills);
   new File: file2 = fopen("settings/stuff.ini", io_write);
   fwrite(file2, coordsstring);
   fclose(file2);
   return 1;
}

public OnGameModeInit()
{
   pickup = CreatePickup(359,2,245.3750, 1862.3672, 20.5, 2);
   pickup2 = CreatePickup(1240,2,246.6172, 1863.3750, 20.5, 2);
   crvenitim = TextDrawCreate(25.000000, 238.000000, "~r~Crveni tim:~b~0");
   TextDrawBackgroundColor(crvenitim, 255);
   TextDrawFont(crvenitim, 1);
   TextDrawLetterSize(crvenitim, 0.410000, 2.000000);
   TextDrawColor(crvenitim, -1);
   TextDrawSetOutline(crvenitim, 1);
   TextDrawSetProportional(crvenitim, 1);
   TextDrawUseBox(crvenitim, 1);
   TextDrawBoxColor(crvenitim, 64);
   TextDrawTextSize(crvenitim, 137.000000, 0.000000);

   plavitim = TextDrawCreate(25.000000, 260.500000, "~b~Plavi tim:~r~0");
   TextDrawBackgroundColor(plavitim, 255);
   TextDrawFont(plavitim, 1);
   TextDrawLetterSize(plavitim, 0.410000, 2.000000);
   TextDrawColor(plavitim, -1);
   TextDrawSetOutline(plavitim, 1);
   TextDrawSetProportional(plavitim, 1);
   TextDrawUseBox(plavitim, 1);
   TextDrawBoxColor(plavitim, 64);
   TextDrawTextSize(plavitim, 137.000000, 0.000000);

   ratnaz = TextDrawCreate(59.000000, 214.000000, "~g~Rat");
   TextDrawBackgroundColor(ratnaz, 255);
   TextDrawFont(ratnaz, 0);
   TextDrawLetterSize(ratnaz, 0.700000, 2.100000);
   TextDrawColor(ratnaz, -1);
   TextDrawSetOutline(ratnaz, 1);
   TextDrawSetProportional(ratnaz, 1);
   TextDrawUseBox(ratnaz, 1);
   TextDrawBoxColor(ratnaz, 64);
   TextDrawTextSize(ratnaz, 94.000000, 0.000000);

   preostalovrijeme = TextDrawCreate(25.000000, 283.000000, "~g~Preostalo vrijeme:~b~120 sec");
   TextDrawBackgroundColor(preostalovrijeme, 255);
   TextDrawFont(preostalovrijeme, 1);
   TextDrawLetterSize(preostalovrijeme, 0.310000, 1.700000);
   TextDrawColor(preostalovrijeme, -1);
   TextDrawSetOutline(preostalovrijeme, 1);
   TextDrawSetProportional(preostalovrijeme, 1);
   TextDrawUseBox(preostalovrijeme, 1);
   TextDrawBoxColor(preostalovrijeme, 64);
   TextDrawTextSize(preostalovrijeme, 137.000000, 0.000000);
   oglasis = SetTimer("RandomMessage",20000,1);



I jos ono gore. Ja mislim da je to sve, oporosti na gnjavazi -.-
Poslednja Izmena: Avgust 31, 2013, 11:03:18 PRE PODNE od mrzli1999