[ajuda]Dinheiro para empresa -
Gabriel_Halls - 09.10.2010
Bom eu estou presisando de ajuda =D bom eu gostaria de saber tipo quando o player vai comprar algo ou digita algo que gaste dinheiro para ir para uma certa empresa vo mostra o comando abaixo.
pawn Код:
if(strcmp(cmd, "/pedagio1", true) == 0)
  {
  if ((PlayerInfo[playerid][pMembro] == 0 || PlayerInfo[playerid][pLider] == 0) && PlayerToPoint(15.0, playerid, 52.512794494629, -1538.8486328125, 6.9165487289429)) {
  MoveObject( Ppdagio, 52.512794494629, -1538.8486328125, 12.9165487289429,3);
  GameTextForPlayer(playerid, "~p~Aberto", 5000, 3);
  GivePlayerMoneyEx(playerid,-500);//dinheiro.. como fas pra ir para uma empresA?
  SendClientMessage(playerid, COLOR_LIGHTBLUE, "Voce Pagou R$500 do pedagio Boa Viagem!");
  SetTimer("Ppdagio4", 5000, false);
  } else {
  SendClientMessage(playerid, COLOR_RED, "*** Voce nao esta no Pdagio ***");
   }
   return 1;
  }
bom gostaria de saber como eu faзo para esse dinheiro ir para a empresa que eu escolher?
Re: [ajuda]Dinheiro para empresa -
sergio_xd - 09.10.2010
facil, Use isto:
pawn Код:
///
  if(strcmp(cmd, "/pedagio1", true) == 0)
  {
    if ((PlayerInfo[playerid][pMembro] == 0 || PlayerInfo[playerid][pLider] == 0) && PlayerToPoint(15.0, playerid, 52.512794494629, -1538.8486328125, 6.9165487289429))
    {
      MoveObject( Ppdagio, 52.512794494629, -1538.8486328125, 12.9165487289429,3);
      GameTextForPlayer(playerid, "~p~Aberto", 5000, 3);
      GivePlayerMoneyEx(playerid,-500);//dinheiro.. como fas pra ir para uma empresA?
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "Voce Pagou R$500 do pedagio Boa Viagem!");
      BizzInfo[id][bTill]+500;//aqui PS O id e o id da empresa
      SetTimer("Ppdagio4", 5000, false);
    }
    else
    {
      SendClientMessage(playerid, COLOR_RED, "*** Voce nao esta no Pedagio ***");
    }
    return 1;
  }
Re: [ajuda]Dinheiro para empresa -
Gabriel_Halls - 09.10.2010
vlw sergio....
Re: [ajuda]Dinheiro para empresa -
sergio_xd - 09.10.2010
de nada....
Re: [ajuda]Dinheiro para empresa -
Gabriel_Halls - 09.10.2010
1 probleminha
pawn Код:
if(strcmp(cmd, "/pedagio1", true) == 0)
  {
  if ((PlayerInfo[playerid][pMembro] == 0 || PlayerInfo[playerid][pLider] == 0) && PlayerToPoint(15.0, playerid, 52.512794494629, -1538.8486328125, 6.9165487289429)) {
  MoveObject( Ppedagio, 52.512794494629, -1538.8486328125, 12.9165487289429,3);
  GameTextForPlayer(playerid, "~p~Aberto", 5000, 3);
  GivePlayerMoneyEx(playerid,-500);
  SendClientMessage(playerid, COLOR_LIGHTBLUE, "Voce Pagou R$500 do pedagio Boa Viagem!");
  SBizzInfo[1][bTill]+500;//aqui oO
  SetTimer("Ppedagio4", 5000, false);
  } else {
  SendClientMessage(playerid, COLOR_RED, "*** Voce nao esta no Ppedagio ***");
   }
   return 1;
  }
Код:
C:\Documents and Settings\Administrador\Meus documentos\jonas\Brasil Forever Life\gamemodes\BFL.pwn(36723) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Meus documentos\jonas\Brasil Forever Life\gamemodes\BFL.pwn(36723) : warning 215: expression has no effect
linha
Код:
SBizzInfo[1][bTill]+500;
oque tem de errado ?
Re: [ajuda]Dinheiro para empresa -
sergio_xd - 09.10.2010
tente colocar
pawn Код:
new pagamento = SBizzInfo[1][bTill]+500;
SBizzInfo[1][bTill] = pagamento;
Re: [ajuda]Dinheiro para empresa -
Gabriel_Halls - 09.10.2010
opa ja consegui colocar peguei a base de outros comandos tipo do /comprarcarro e tal jah consegui vlw!