daily pastebin goal
83%
SHARE
TWEET

Untitled

StefkeZ Jun 13th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fDialog(3010)
  2. {
  3.         if( WARPInfo[ playerid ][ warID ] == -1 ) return SendErrorMessage( playerid, "Nisi u waru." );
  4.         new player, w = WARPInfo[ playerid ][ warID ];
  5.         if( sscanf( inputtext, "u", player ) ) return SPD( playerid, 3010, DSI, "Ubacivanje igraca", "Inesi ID igraca iz tvoje organizacije", "Potvrdi", "Odustani" );
  6.         if( WARInfo[ w ][ warActive ] == false ) return SendErrorMessage( playerid, "WAR jos nije startovan.");
  7.         if( player == playerid ) return SPD( playerid, 3010, DSI, "Ubacivanje igraca", "Inesi ID igraca iz tvoje organizacije", "Potvrdi", "Odustani" );
  8.         if( player == IPI ) return SPD( playerid, 3010, DSI, "Ubacivanje igraca", "Inesi ID igraca iz tvoje organizacije", "Potvrdi", "Odustani" );
  9.         if( WARPInfo[ player ][ warID ] != -1 ) return SPD( playerid, 3010, DSI, "Ubacivanje igraca", "Inesi ID igraca iz tvoje organizacije", "Potvrdi", "Odustani" );
  10.         if( WARPInfo[ playerid ][ warTeam ][ 0 ] == true ) {
  11.             if( WARInfo[ w ][ warTeamMembers ][ 0 ] >= WARInfo[ w ][ warMapMembers ] ) return SendErrorMessage(playerid, "Vec imas maksimalni broj clanova u waru.");
  12.  
  13.             GetPlayerPos( player, WARPInfo[ player ][ LastPosition ][ 0 ], WARPInfo[ player ][ LastPosition ][ 1 ],  WARPInfo[ player ][ LastPosition ][ 2 ] );
  14.             WARPInfo[ player ][ LastVirtualWorld ] = GetPlayerVirtualWorld( player );
  15.             WARPInfo[ player ][ LastInterior ] = GetPlayerInterior( player );
  16.  
  17.             new rand1 = random( sizeof( warMap1Team1 ) );
  18.             new rand21 = random( sizeof( warMap2Team1 ) );
  19.             new rand31 = random( sizeof( warMap3Team1 ) );
  20.             new rand41 = random( sizeof( warMap4Team1 ) );
  21.             new rand51 = random( sizeof( warMap5Team1 ) );
  22.             if( WARInfo[ w ][ warMap ] == 1 ) {
  23.                 SetPlayerPos( player, warMap1Team1[ rand1 ][ 0 ], warMap1Team1[ rand1 ][ 1 ],warMap1Team1[ rand1 ][ 2 ] );
  24.                 SetPlayerInterior( player, 0 );
  25.             }
  26.             else if( WARInfo[ w ][ warMap ] == 2 ) {
  27.                 SetPlayerPos( player, warMap2Team1[ rand21 ][ 0 ], warMap2Team1[ rand21 ][ 1 ],warMap2Team1[ rand21 ][ 2 ] );
  28.                 SetPlayerInterior( player, 10 );
  29.             }
  30.             else if( WARInfo[ w ][ warMap ] == 3 ) {
  31.                 SetPlayerPos( player, warMap3Team1[ rand31 ][ 0 ], warMap3Team1[ rand31 ][ 1 ],warMap3Team1[ rand31 ][ 2 ] );
  32.                 SetPlayerInterior( player, 0 );
  33.             }
  34.             else if( WARInfo[ w ][ warMap ] == 4 ) {
  35.                 SetPlayerPos( player, warMap4Team1[ rand41 ][ 0 ], warMap4Team1[ rand41 ][ 1 ],warMap4Team1[ rand41 ][ 2 ] );
  36.                 SetPlayerInterior( player, 0 );
  37.             }
  38.             else if( WARInfo[ w ][ warMap ] == 5 ) {
  39.                 SetPlayerPos( player, warMap5Team1[ rand51 ][ 0 ], warMap5Team1[ rand51 ][ 1 ],warMap5Team1[ rand51 ][ 2 ] );
  40.                 SetPlayerInterior( player, 0 );
  41.             }
  42.  
  43.  
  44.             GivePlayerWeapon( player, WARInfo[ w ][ warGuns ][ 0 ], 300 );
  45.             GivePlayerWeapon( player, WARInfo[ w ][ warGuns ][ 1 ], 300 );
  46.             GivePlayerWeapon( player, WARInfo[ w ][ warGuns ][ 2 ], 300 );
  47.             GivePlayerWeapon( player, WARInfo[ w ][ warGuns ][ 3 ], 300 );
  48.             SetPlayerVirtualWorld( player, w );
  49.             SetPlayerHealth( player, 100 );
  50.             SetPlayerArmour( player, 100 );
  51.  
  52.             WARInfo[ w ][ warTeamMembers ][ 0 ]++;
  53.  
  54.             ResetWarStatistics( player );
  55.             WARPInfo[ player ][ warTeam ][ 0 ] = true;
  56.             WARPInfo[ player ][ warID ] = w;
  57.  
  58.             SCM( player, -1, "War chat /wp." );
  59.             SCM( playerid, -1, "Ubacio si svog clana." );
  60.  
  61.             WarTDControl( player, true );
  62.             SetWarStatsTD( w );
  63.         }
  64.         else if( WARPInfo[ playerid ][ warTeam ][ 1 ] == true ) {
  65.             if( WARInfo[ w ][ warTeamMembers ][ 1 ] >= WARInfo[ w ][ warMapMembers ] ) return SendErrorMessage(playerid, "Imate maksimalan broj clanova u waru!");
  66.  
  67.             GetPlayerPos( player, WARPInfo[ player ][ LastPosition ][ 0 ], WARPInfo[ player ][ LastPosition ][ 1 ],  WARPInfo[ player ][ LastPosition ][ 2 ] );
  68.             WARPInfo[ player ][ LastVirtualWorld ] = GetPlayerVirtualWorld( player );
  69.             WARPInfo[ player ][ LastInterior ] = GetPlayerInterior( player );
  70.  
  71.             new rand2 = random( sizeof( warMap1Team2 ) );
  72.             new rand22 = random( sizeof( warMap2Team2 ) );
  73.             new rand32 = random( sizeof( warMap3Team2 ) );
  74.             new rand42 = random( sizeof( warMap4Team2 ) );
  75.             new rand52 = random( sizeof( warMap5Team2 ) );
  76.             if( WARInfo[ w ][ warMap ] == 1 ) {
  77.                 SetPlayerPos( player, warMap1Team2[ rand2 ][ 0 ], warMap1Team2[ rand2 ][ 1 ],warMap1Team2[ rand2 ][ 2 ] );
  78.                 SetPlayerInterior( player, 0 );
  79.             }
  80.             else if( WARInfo[ w ][ warMap ] == 2 ) {
  81.                 SetPlayerPos( player, warMap2Team2[ rand22 ][ 0 ], warMap2Team2[ rand22 ][ 1 ],warMap2Team2[ rand22 ][ 2 ] );
  82.                 SetPlayerInterior( player, 10 );
  83.             }
  84.             else if( WARInfo[ w ][ warMap ] == 3 ) {
  85.                 SetPlayerPos( player, warMap3Team2[ rand32 ][ 0 ], warMap3Team2[ rand32 ][ 1 ],warMap3Team2[ rand32 ][ 2 ] );
  86.                 SetPlayerInterior( player, 0 );
  87.             }
  88.             else if( WARInfo[ w ][ warMap ] == 4 ) {
  89.                 SetPlayerPos( player, warMap4Team2[ rand42 ][ 0 ], warMap4Team2[ rand42 ][ 1 ],warMap4Team2[ rand42 ][ 2 ] );
  90.                 SetPlayerInterior( player, 0 );
  91.             }
  92.             else if( WARInfo[ w ][ warMap ] == 5 ) {
  93.                 SetPlayerPos( player, warMap5Team2[ rand52 ][ 0 ], warMap5Team2[ rand52 ][ 1 ],warMap5Team2[ rand52 ][ 2 ] );
  94.                 SetPlayerInterior( player, 0 );
  95.             }
  96.  
  97.             GivePlayerWeapon( player, WARInfo[ w ][ warGuns ][ 0 ], 300 );
  98.             GivePlayerWeapon( player, WARInfo[ w ][ warGuns ][ 1 ], 300 );
  99.             GivePlayerWeapon( player, WARInfo[ w ][ warGuns ][ 2 ], 300 );
  100.             GivePlayerWeapon( player, WARInfo[ w ][ warGuns ][ 3 ], 300 );
  101.             SetPlayerVirtualWorld( player, w );
  102.             SetPlayerHealth( player, 100 );
  103.             SetPlayerArmour( player, 100 );
  104.  
  105.             WARInfo[ w ][ warTeamMembers ][ 1 ]++;
  106.  
  107.             ResetWarStatistics( player );
  108.             WARPInfo[ player ][ warTeam ][ 1 ] = true;
  109.             WARPInfo[ player ][ warID ] = w;
  110.  
  111.             SCM( player, -1, "War chat /wp." );
  112.             SCM( playerid, -1, "Ubacio si svog clana." );
  113.  
  114.             WarTDControl( player, true );
  115.             SetWarStatsTD( w );
  116.         }
  117.         return 1;
  118. }
  119. //==============================================================================
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top