[Help] Export param to dialog
#1

hello im making a /sellto command for vehicle system, i would like to know if there is anyway to export id from code:
pawn Код:
CMD:sellto(playerid, params[])
{
  if(!isvehicleowner = 1 && IsPlayerInAnyVehicle) return SendClientMessage(playerid, COLOR_BLUE, "You are not the vehicle owner");
  new str[128], id, price, pname, name[MAX_PLAYER_NAME];
  if(sscanf(params, "ud", id, price)) return SendClientMessage(playerid, COLOR_BLUE, "Use: /sellto [playerid] [Price]");
  pname = GetPlayerName(playerid, name, sizeof(name));
  format(str, sizeof(str), "Player %s wants to sell a vehicle to you", pname);
  ShowPlayerDialog(id, DIALOG_SELLTO_VEHICLE, DIALOG_STYLE_MSGBOX, "Offer", str, "Buy", "Nope");
  return 1;
}

  if(dialogid == DIALOG_SELLTO_VEHICLE)
  {
    if(response)
    {
      if(pinfo[playerid][money] < vehprice) return SendClientMessage(playerid, COLOR_BLUE, "You dont got the money!");
      IsVehicleOwner[id] = 0;
      IsVehicleOwner[playerid] = 1;
    }
  }
to ondialogresponse, basicly i want to set is vehicle owner of the seller to 0 and the buyer to 1, but i have no idea how to get the seller id in ondialogresponse
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)