Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: · KaTaNNa · on January 05, 2013, 12:37:18 am

Title: I have a problem
Post by: · KaTaNNa · on January 05, 2013, 12:37:18 am
Hi all, here is my cmd. apparently the server fails to function, or nose if I'm the bad scripter.
get to the point, I want the server to deliver $ 100 to 2 players from different teams randomly.
example: pedro (Team X): get $ 100 from the server.
example: guy (and team) receives $ 100 from the server.
That's what I want to do the server

[pawn]else if ( strcmp( cmd, "cashazar", true ) == 0 )
   {         
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Por favor,conectate en tu cuenta!" );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "Tu no tienes acceso a este comando!" );      
      else
      {      
         format( szMsg, 256, "Admin [%s] starting Cash Azar", gPlayers[ playerid ]);
         SendClientMessageToAll( GREEN, szMsg );                     
         new m = GetMaxPlayers() + 1;   
         for(new i = 0; i < m; i++) {
        if (IsPlayerConnected(i)) {
   if(GetPlayerTeam(random(m)) == 15) {
   format(szMsg,256,"[%s] the leader of your team receives $100.",gPlayers[ random(m) ]);
   SendClientMessageToAll(BLUE, szMsg);
   IncPlayerHandCash(random(m),100);   
   }
   else if(GetPlayerTeam(random(m)) == 11) {
   format(szMsg,256,"[%s] the leader of your team receives $100.",gPlayers[ random(m) ]);
   SendClientMessageToAll(COLOR_YELLOW, szMsg);
   IncPlayerHandCash(random(m),100);   
  }      
  }
  }
  }      
   return 1;
   }[/pawn]
Title: Re: I have a problem
Post by: aledark24 on January 05, 2013, 06:33:16 pm
Podrias crear algo asi como el de empleo pero ke de dinero ejemplo cada 1 hora pero por level -_- no crees que eso seria mas facil?? si no tienes idea como me dices por face..