War System

Započeo .варнинг, Oktobar 30, 2017, 21:10:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Skripta koju koristim:GhostTown
Detaljan opis problema:Prebacujem War System iz PerfectGaming Moda ali mi izbacuje errore.
Dio skripte:WARMessage( WARPInfo[ playerid ][ warID ], -1, globalstring );
Neke slike/video za lakse dobivanje pomoci(neobavezno): http://prntscr.com/h42akn
                                                                                 
Legacy Gaming Since 2017 ©

Scripter and Founder
Scripting 3+ Years
https://www.facebook.com/LegacyGamingOGC/ (FB Stranica)
https://www.facebook.com/nikolaa.jovicic (FB Nalog)

                                                                                 

Proveri da li si uneo dobre parametre za WARMessage funkciju.


“Without requirements or design, programming is the art of adding bugs to an empty text file.” - Louis Srygley

Imam new WARMessage,stock WARMessage i forward WARMessage.Pocetnik sam u skriptanju pa ne znam puno :/
                                                                                 
Legacy Gaming Since 2017 ©

Scripter and Founder
Scripting 3+ Years
https://www.facebook.com/LegacyGamingOGC/ (FB Stranica)
https://www.facebook.com/nikolaa.jovicic (FB Nalog)

                                                                                 

posalji stock warmessage i forward

stock WARMessage( w, color, string[] ) {
foreach( Player, i ) {
if( WARPInfo[ i ][ warID ] == w ) {
SCM( i, color, string );
}
}

forward SendWarMessage(color, string[]);
public SendWarMessage(color,string[])
{
        foreach(Player,i)
        {
            if(PlayerInfo[i][pWar] > 0)
            {
                SendClientMessage(i, color, string);
                }
        }
        return 1;
}
                                                                                 
Legacy Gaming Since 2017 ©

Scripter and Founder
Scripting 3+ Years
https://www.facebook.com/LegacyGamingOGC/ (FB Stranica)
https://www.facebook.com/nikolaa.jovicic (FB Nalog)

                                                                                 

Probaj ovako.
[pawn]
stock WARMessage( w, color, string[] )
{
   foreach( Player, i )
        {
      if( WARPInfo[ i ][ warID ] == w )
                {
         SCM( i, color, string );
      }
   }
        return 1;
}
[/pawn]

[pawn]
forward SendWarMessage(color, string[]);
public SendWarMessage(color,string[])
{
        foreach(Player,i)
        {
            if(PlayerInfo[pWar] > 0)
            {
                SendClientMessage(i, color, string);
            }
        }
        return 1;
}
[/pawn]
Poslednja Izmena: Novembar 01, 2017, 19:57:28 POSLE PODNE od Sploxs

Pokusacu cim opet ubacim sistem jer sam bio izbacio jer sam bio odusatao.
                                                                                 
Legacy Gaming Since 2017 ©

Scripter and Founder
Scripting 3+ Years
https://www.facebook.com/LegacyGamingOGC/ (FB Stranica)
https://www.facebook.com/nikolaa.jovicic (FB Nalog)

                                                                                 

Citat: Nikola4 poslato Novembar 01, 2017, 19:57:06 POSLE PODNE
Pokusacu cim opet ubacim sistem jer sam bio izbacio jer sam bio odusatao.

Meni se cini da ti nisi bio poslao gore cijeli stock od WARMessage

Jesam,evo svi stockovi od Wara stock WarTDControl( playerid, bool:show ) {
if( show == true ) {
        for( new i = 0; i < 9; i ++ ) {
PlayerTextDrawShow( playerid, WARTextDraw[ playerid ][ i ] );
}
}
else if( show == false ) {
for( new i = 0; i < 9; i ++ ) {
PlayerTextDrawHide( playerid, WARTextDraw[ playerid ][ i ]);
}
}
}

stock WARMessage( w, color, string[] ) {
foreach( Player, i ) {
if( WARPInfo[ i ][ warID ] == w ) {
SCM( i, color, string );
}
}
}

stock SetWarStatsTD( w ) {
new string[ 128 ];
foreach( Player, id ) {
if( WARPInfo[ id ][ warID ] == w ) {
format( string ,sizeof( string ),"~w~Ubistva: ~g~%d~n~~w~Smrti: ~r~%d~n~~w~Igraci: ~y~%d", WARInfo[ w ][ warTeamScore ][ 0 ], WARInfo[ w ][ warTeamScore ][ 1 ], WARInfo[ w ][ warTeamMembers ][ 0 ] );
PlayerTextDrawSetString( id, WARTextDraw[ id ][ 5 ],  string );
format( string ,sizeof( string ),"~w~Ubistva: ~g~%d~n~~w~Smrti: ~r~%d~n~~w~Igraci: ~y~%d", WARInfo[ w ][ warTeamScore ][ 1 ], WARInfo[ w ][ warTeamScore ][ 0 ], WARInfo[ w ][ warTeamMembers ][ 1 ] );
PlayerTextDrawSetString( id, WARTextDraw[ id ][ 6 ],  string );
}
}
}
ResetWarStatistics( playerid ) {
    WARPInfo[ playerid ][ warTeam ][ 0 ] = false;
    WARPInfo[ playerid ][ warTeam ][ 1 ] = false;
    WARPInfo[ playerid ][ warKills ] = 0;
    WARPInfo[ playerid ][ warDeaths ] = 0;
    WARPInfo[ playerid ][ warID ] = -1;
}
forward StopWAR( w );
public StopWAR( w ) {
    WARInfo[ w ][ warActive ] = false;
    WARInfo[ w ][ warCreating ] = false;
KillTimer( WARInfo[ w ][ warTimer ] );
foreach( Player, i ) {
    if( WARPInfo[ i ][ warID ] == w ) {

      if (WARInfo[ w ][ warTeamScore ][ 0 ] > WARInfo[ w ][ warTeamScore ][ 1 ] ) {
          if( WARPInfo[ i ][ warTeam ][ 0 ] ) {
          SCM( i, -1, ""ORANGE"WAR "BELA"| "ORANGE"Vas tim je pobedio i osvojili ste"BELA"100%!");
          }
      }
      if(WARInfo[ w ][ warTeamScore ][ 1 ] > WARInfo[ w ][ warTeamScore ][ 0 ] ) {
          if( WARPInfo[ i ][ warTeam ][ 1 ] ) {
          SCM( i, -1, ""ORANGE"WAR "BELA"| "ORANGE"Vas tim je pobedio i osvojili ste"BELA"100%!");
          }
      }
      SCM( i, -1, globalstring );
      format( globalstring, sizeof( globalstring ), ""ORANGE"WAR "BELA"| "ORANGE"Tvoj skor "BELA"|  "ORANGE"Ubistva: "BELA"%d "BELA"| "ORANGE"Smrti: "BELA"%d", WARPInfo[ i ][ warKills ], WARPInfo[ i ][ warDeaths ] );
      SCM( i, -1, globalstring);
      format( globalstring, sizeof( globalstring ), ""ORANGE"WAR "BELA"| "COL_TEAM1"Tim 1: "BELA"%d | "COL_TEAM2"Tim 2: "BELA"%d", WARInfo[ w ][ warTeamScore ][ 0 ], WARInfo[ w ][ warTeamScore ][ 1 ]  );
      SCM( i, -1, globalstring );

      WARPInfo[ i ][ warID ] = -1;
        JBC_SetPlayerHealth( i, 100 );

        JBC_SetPlayerPos( i, WARPInfo[ i ][ LastPosition ][ 0 ], WARPInfo[ i ][ LastPosition ][ 1 ],  WARPInfo[ i ][ LastPosition ][ 2 ] );
        SetPlayerVirtualWorld( i, WARPInfo[ i ][ LastVirtualWorld ] );
        SetPlayerInterior( i, WARPInfo[ i ][ LastInterior ] );


ResetPlayerWeapons( i );

        ResetWarStatistics( i );

        WarTDControl( i, false );
}
}
WARInfo[ w ][ warTeamMembers ][ 0 ] = 0;
    WARInfo[ w ][ warTeamMembers ][ 1 ] = 0;
    WARInfo[ w ][ warTeamScore ][ 0 ] = 0;
    WARInfo[ w ][ warTeamScore ][ 1 ] = 0;
return true;
}
                                                                                 
Legacy Gaming Since 2017 ©

Scripter and Founder
Scripting 3+ Years
https://www.facebook.com/LegacyGamingOGC/ (FB Stranica)
https://www.facebook.com/nikolaa.jovicic (FB Nalog)

                                                                                 

Opet isti errori...
                                                                                 
Legacy Gaming Since 2017 ©

Scripter and Founder
Scripting 3+ Years
https://www.facebook.com/LegacyGamingOGC/ (FB Stranica)
https://www.facebook.com/nikolaa.jovicic (FB Nalog)